GNOME Bugzilla – Bug 317634
batch mode globbing broken
Last modified: 2007-10-21 20:40:39 UTC
Follow the steps for the second example (batch unsharp-mask on multiple files) in: http://gimp.org/tutorials/Basic_Batch/ Even if you add an extra -b before the '(gimp-quit 0)', it still fails. % gimp-2.3 -i -b '(batch-unsharp-mask "*.jpg" 5.0 0.5 0)' -b '(gimp-quit 0)' This is a development version of The GIMP. Debug messages may appear here. No batch interpreter specified, using the default 'plug-in-script-fu-eval'. batch command: experienced an execution error. plug_in_close: plug-in aborted before sending its procedure return values Passing just gimp-quit gives the same error: % gimp-2.3 -i -b '(gimp-quit 0)' This is a development version of The GIMP. Debug messages may appear here. No batch interpreter specified, using the default 'plug-in-script-fu-eval'. plug_in_close: plug-in aborted before sending its procedure return values The Python example Yosh posted recently, http://www.mail-archive.com/gimp-user@lists.xcf.berkeley.edu/msg08897.html fails in the same way with the same error message. The script-fu example works in 2.2 (I don't have a python enabled 2.2 handy to test the python example). Though the script-fu example seems to fail even in 2.2 on mac and windows; is batch mode linux only? Mitch tracked it down to this check-in: <mitch> 2005-03-01 Kevin Cozens <kcozens@cvs.gnome.org> <mitch> * plug-ins/script-fu/siod-wrapper.c: Fixed marshalling code to <mitch> treat string arrays as arrays instead of lists of strings. Last <mitch> part of the fix for bug #168290. Apparently file-glob does different things in HEAD vs 2.2.
This report combines three separate issues. Issue 1 The batch script works with GIMP 2.2 under Linux but not on a Mac or in Windows. Issue 2 The change in the CVS version of GIMP which treats string arrays as arrays. Issue 3 The message displayed when gimp-quit is called.
I don't think it deals with anything but issue #2. #1 has already been taken care of by compiling gimp-console by default. #3 is a trivial issue.
Reverted the incompatible changes. Batch mode works again. 2005-10-05 Sven Neumann <sven@gimp.org> * plug-ins/script-fu/siod-wrapper.c: reverted changes to handling of string arrays to stay backward compatible (see bug #168290 and bug #317634). * plug-ins/script-fu/scripts/font-map.scm: reverted change that was done to adapt to above changes (see bug #308681).
Looks like this change crept back in when the switch to TinyScheme was made. Reopening.
Created attachment 97527 [details] [review] Patch to fix STRINGARRAY handling for backwards compatability. This patch doesn't insure protection of the data cells being used in the list being built in the STRINGARRAY case which starts at line 1411. The TinyScheme gc fix in SourceForge (see changes between version 1.8 and 1.9 of scheme.c) should be reviewed for use in Script-Fu's TinyScheme. The change shifts responsibility for protection of cells from Scheme/C interface code (as we have it now) to the Scheme interpreter.
2007-10-21 Kevin Cozens <kcozens@cvs.gnome.org> * plug-ins/script-fu/scheme-wrapper.c: Reverted changes in handling of string arrays to stay backwards compatible (see bug #317634). * plug-ins/script-fu/scripts/font-map.scm: Updated based on change in handling of string arrays listed above.