GNOME Bugzilla – Bug 109605
Add ability to cancel Script-Fu scripts
Last modified: 2018-05-24 10:49:49 UTC
Maybe I'm too stupid to find out, but the gimp should really have an option to cancel the execution of a running script-fu script. Especially for development, this would be very nice.
Which script are you referring to? I have tested a few ones here and there is always a window poping up with a progress bar and a cancel button. For plugins, there is the same cancel + progress bar utility at the bottom right of the image window. Maybe some external filter factory don't have this, but in thais case, it is not really a gimp bug.
I'm refering to accidental looping to infinity in *developing* script-fus. Things like "(while (= 1 1))".
Would certainly be nice to have but not trivial to implement.
Changes at the request of Dave Neary on the developer mailing list. I am changing many of the bugzilla reports that have not specified a target milestone to Future milestone. Hope that is acceptable.
This sounds extremely hard to implement - for example, a script-fu can end up opening and closing various files and displays, load various modal plugins, etc. etc. -- where would you put the loop, and how would you break out? What about cleanup from stopping in the middle? [Java, for example, deprecated functions that stop threads in their tracks...] I'd be willing to guess there are also performance issues... It might be easier to make effective use of the "ps" and "kill" tools on your OS (or Task Manager, if in Windows) and avoid writing e.g. infinitely-looping scripts in the first place. I understand not everyone is perfect, but even if such a feature was implemented, it might be relatively dangerous (Would repeated init-stop that creates new images without cleanup cause memory overflow or out of memory errors?).
Is this another instance of the Halting problem? Can Gimp guess when programs will end?
Future plans for Script-Fu call for scripts to be run as plug-ins in the same way Python and Perl scripts are run. I don't know when this change will happen.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/37.