<div class="markdown_content"><hr/>
<p><strong> <a class="alink" href="https://sourceforge.net/p/pure-data/bugs/1275/">[bugs:#1275]</a> changing num radio cells in a subpath via loadbang causes a TCL error</strong></p>
<p><strong>Status:</strong> open<br/>
<strong>Group:</strong> v0.47<br/>
<strong>Created:</strong> Mon Nov 28, 2016 07:41 PM UTC by danomatika<br/>
<strong>Last Updated:</strong> Mon Nov 28, 2016 07:41 PM UTC<br/>
<strong>Owner:</strong> nobody<br/>
<strong>Attachments:</strong></p>
<ul>
<li><a class="" href="https://sourceforge.net/p/pure-data/bugs/1275/attachment/hradio-error.pd">hradio-error.pd</a> (262 Bytes; application/octet-stream)</li>
</ul>
<p>On Mac OS 10.11.6, using a custom build of Pd 0.47-1:</p>
<p>I was using an abstraction from rjlib that shows an hradio object in a GOP area and tracked down the following bug.</p>
<p>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:</p>
<div class="codehilite"><pre><span class="x">(Tcl) INVALID COMMAND NAME: invalid command name ".x7d811430.c"</span>
<span class="x">    while executing</span>
<span class="x">".x7d811430.c delete 7aa63e00BASE0"</span>
<span class="x">    ("uplevel" body line 40)</span>
<span class="x">    invoked from within</span>
<span class="x">"uplevel </span><span class="err">#</span><span class="x">0 </span><span class="p">$</span><span class="nv">docmds</span><span class="x">"</span>
</pre></div>


<p>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.</p>
<p>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.</p>
<p>Attached is a patch which triggers the error.</p>
<hr/>
<p>Sent from sourceforge.net because pd-dev@lists.iem.at is subscribed to <a href="https://sourceforge.net/p/pure-data/bugs/">https://sourceforge.net/p/pure-data/bugs/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/pure-data/admin/bugs/options.">https://sourceforge.net/p/pure-data/admin/bugs/options.</a>  Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>