[bugs:#1275] changing num radio cells in a subpath via loadbang causes a TCL error

Status: open
Group: v0.47
Created: Mon Nov 28, 2016 07:41 PM UTC by danomatika
Last Updated: Mon Nov 28, 2016 07:41 PM UTC
Owner: nobody
Attachments:

On Mac OS 10.11.6, using a custom build of Pd 0.47-1:

I was using an abstraction from rjlib that shows an hradio object in a GOP area and tracked down the following bug.

Changing the number of cells in a radio object placed in a subpatch via a loadbang-ed number message to change the numer of cells results in an error:

(Tcl) INVALID COMMAND NAME: invalid command name ".x7d811430.c"
    while executing
".x7d811430.c delete 7aa63e00BASE0"
    ("uplevel" body line 40)
    invoked from within
"uplevel #0 $docmds"

From what I can tell, the loadbang fires before the radio is drawn for the first time since it is in a subpatch, so there are no cells to delete leading to the error. This also, for some reason, causes sliders and radios to be come unresponsive since the controls no longer re-draw in the particular patch where I first had the bug.

The fix I have for now is to add a 5ms delay after the loadbang. I think the real fix is to only call IEM_GUI_DRAW_MODE_ERASE in hradio_number() if the radio has already been drawn.

Attached is a patch which triggers the error.


Sent from sourceforge.net because pd-dev@lists.iem.at is subscribed to https://sourceforge.net/p/pure-data/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/pure-data/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.