Menu

#509 prevent recursive loading of gui-plugins

bugfix
open
puredata (385)
5
2013-03-28
2013-03-28
No

if a gui-plugin loads other plugin, we might easily encounter a recursion (where the plugin tries to load itself).
while the current gui-plugin loader mechanism tries to prevent re-loading of the "same" plugin (based on the filename of the plugin), it doesn't catch recursive loading.
the attached patch fixes this, by adding the to-be-loaded plugin to the "::loaded_plugins" list, then tries to load it and removes it from the list if the loading fails
(rather than adding the plugin to the list after the loading succeeded)

Discussion

  • IOhannes m zmölnig

    apply with "git am ..." (todays git/master)

     
  • IOhannes m zmölnig

    forgot: the patch also makes "load_plugin_script" return '1' if the plugin script has been successfully loaded, or '0' otherwise.

     
  • Hans-Christoph Steiner

    I haven't tested this, but the rationale and the patch make sense to me.

     

Anonymous
Anonymous

Add attachments
Cancel