[patches:#567] prevent TCL-backtrace when using plugin-dispatch with an unknown receiver
Status: open
Group: bugfix
Labels: pd-gui
Created: Sat Nov 21, 2015 10:22 PM UTC by IOhannes m zmölnig
Last Updated: Sat Nov 21, 2015 10:22 PM UTC
Owner: Miller Puckette
Attachments:
there's a "plugin-dispatch" mechanism built into pd/pd-gui, that provides a uniform way to send messages from pd-core (e.g. an abstraction) to a pd-gui plugin.
unfortunately, the current implementation does not do any error checking, so if an abstraction assumes that a gui-plugin is installed (although it is not) and sends [; pd plugin-dispatch foo(
(where foo is the receiver label of the gui plugin), then Pd will give a long and ugly Tcl-Backtrace, which is not very helpful to anybody.
the attached patch fixes this by silently ignoring plugin-dispatch
messages to unknown receivers (assuming that it's easy on the patch/plugin level to establish a little ping/pong handshake between patch and gui-plugin to establish the proper initialization of both, and issue an error if this is not the case).
an alternative solution would be to replace the backtrace by a single error-line (though this does not allow for custom error messages :-()
Sent from sourceforge.net because pd-dev@lists.iem.at 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.