[PD-dev] [pure-data:patches] #567 prevent TCL-backtrace when using plugin-dispatch with an unknown receiver

IOhannes m zmölnig zmoelnig at users.sf.net
Sat Nov 21 23:22:06 CET 2015




---

** [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:**

- [0001-check-whether-a-plugin-dispatcher-is-registered-for-.patch](https://sourceforge.net/p/pure-data/patches/567/attachment/0001-check-whether-a-plugin-dispatcher-is-registered-for-.patch) (1.6 kB; text/x-diff)


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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20151121/05eb68ff/attachment.html>


More information about the Pd-dev mailing list