---

** [patches:#555] never send NULL selectors to objects**

**Status:** open
**Group:** bugfix
**Labels:** puredata-dev crash 
**Created:** Fri Aug 28, 2015 08:07 PM UTC by IOhannes m zmölnig
**Last Updated:** Fri Aug 28, 2015 08:07 PM UTC
**Owner:** Miller Puckette


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).

however, this list method is called with a selector set to 0 (NULL).

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:
-if the downstream object has an `anything` method and accesses the selector 
name without checking for NULL first (e.g. `[print]` will simply crash because 
it tries to print the non-existing selector) OR
- if the downstream object has no `anything` method, the dispatcher will crash 
when trying to display the `no method for ...` error

since this means that NULL-selectors are forbidden within Pd, Pd shouldn't emit 
them intentionally.

attached are two patches:
- `0001-never-send-NULL-selectors-to-objects.patch` makes sure that the 
dispatcher does not generate messages with a NULL-selector.
- `0002-gracefully-handle-messages-with-NIL-selector.patch` 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).

the first patch is more important.



---

Sent from sourceforge.net because [email protected] is subscribed to 
https://sourceforge.net/p/pure-data/patches/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/pure-data/admin/patches/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Pd-dev mailing list
[email protected]
http://lists.puredata.info/listinfo/pd-dev

Reply via email to