GNOME Bugzilla – Bug 346859
RUN_WITH_LAST_VALS is broken for compose plugin
Last modified: 2006-07-30 22:41:15 UTC
When ever I try to run the Compose plugin via Filters->Repeat last, I get error messages like: " GIMP Message PDB calling error for procedure 'gimp-image-width': Argument 'image' (#1, type GimpImageID) out of bounds (validation changed '4' to '-1') Compose Message Images have different size " This looks like it might be related to the recent PDB changes. More Info: I loaded in the image I wanted to compose from, as the first image (it got ID 1) I ran compose, in L*a*b mode (my layers are labeled accordingly, so it autodetected the correct values to use). This created a new image with ID 2. (and i did it again to make an image with ID 3) ID 4 seems to be the image that WOULD be created by the repeated call to the Compose plugin (but has not yet been created? after the error, there are no stray images in the Images tab.) ; My image is also unusually small, 3*9 pixels. I'll attach it, though it seems a very ordinary image.
Created attachment 68544 [details] example source image
A lot of plug-ins suffer from this problem. They are storing image or drawable IDs and use them without verifying that the ID is still valid. For interactive use this is less of a problem because widgets like the image combo-box will select the first item if the old ID is invalid. But for non-interactive use this doesn't happen. Unfortunately the PDB API is missing an easy way to validate an image or drawable ID. We should probably add such functions and review all plug-ins.
Mitch, what do you think about adding gimp_image_is_valid(), gimp_drawable_is_valid() and gimp_vectors_is_valid() to the PDB?
Yes, these functions would be useful, but this was another bug :) Fixed in CVS: 2006-07-31 Michael Natterer <mitch@gimp.org> * plug-ins/common/compose.c (run): enable "compose_by_drawable" for GIMP_RUN_WITH_LAST_VALS, since these values are drawable IDs, not image IDs. Fixes bug #346859.