<div class="markdown_content"><hr/>
<p><strong> <a class="alink" href="http://sourceforge.net/p/pure-data/patches/555/">[patches:#555]</a> never send NULL selectors to objects</strong></p>
<p><strong>Status:</strong> open<br/>
<strong>Group:</strong> bugfix<br/>
<strong>Labels:</strong> puredata-dev crash <br/>
<strong>Created:</strong> Fri Aug 28, 2015 08:07 PM UTC by IOhannes m zmölnig<br/>
<strong>Last Updated:</strong> Fri Aug 28, 2015 08:07 PM UTC<br/>
<strong>Owner:</strong> Miller Puckette</p>
<p>when an object receives bang/float/symbol/pointer messages without having a bang/float/symbol/pointer method defined, it will use the list method instead (if the object has set one).</p>
<p>however, this list method is called with a selector set to 0 (NULL).</p>
<p>if the object passes on the exact incoming message to its outlet (keeping the NULL selector intact), this will lead to a crash, in most cases:<br/>
-if the downstream object has an <code>anything</code> method and accesses the selector name without checking for NULL first (e.g. <code>[print]</code> will simply crash because it tries to print the non-existing selector) OR<br/>
- if the downstream object has no <code>anything</code> method, the dispatcher will crash when trying to display the <code>no method for ...</code> error</p>
<p>since this means that NULL-selectors are forbidden within Pd, Pd shouldn't emit them intentionally.</p>
<p>attached are two patches:<br/>
- <code>0001-never-send-NULL-selectors-to-objects.patch</code> makes sure that the dispatcher does not generate messages with a NULL-selector.<br/>
- <code>0002-gracefully-handle-messages-with-NIL-selector.patch</code> makes sure that at least the dispatcher does not crash if it encounters a method with a NULL-selector (as generated by some random object).</p>
<p>the first patch is more important.</p>
<hr/>
<p>Sent from sourceforge.net because pd-dev@lists.iem.at is subscribed to <a href="https://sourceforge.net/p/pure-data/patches/">https://sourceforge.net/p/pure-data/patches/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/pure-data/admin/patches/options.">https://sourceforge.net/p/pure-data/admin/patches/options.</a>  Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>