After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 364429 - Filmstrip plugin crashes
Filmstrip plugin crashes
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.3.x
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-10-23 13:54 UTC by Vladimir Savic
Modified: 2008-01-15 14:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
filmstrip fixes (36.57 KB, patch)
2006-12-01 16:02 UTC, Aurimas Juška
none Details | Review
filmstrip fixes (changed) (34.84 KB, patch)
2006-12-01 18:50 UTC, Aurimas Juška
committed Details | Review

Description Vladimir Savic 2006-10-23 13:54:37 UTC
I've got this message 

(film:8280): LibGimp-CRITICAL **: gimp_pixel_rgn_init: assertion `x >= 0 && x + width <= drawable->width' failed
/usr/lib/gimp/2.0/plug-ins/film: fatal error: Segmentation fault

When tried plugin in this situation:

1. New image (chose size)
2. Draw text on canvas (you'll have a new layer smaller then image, which is, I think, crucial for crash to happen)
3. Start Filmstrip plugin and apply it using default parameters.

Message should pop up now.
Comment 1 Michael Natterer 2006-10-23 22:13:41 UTC
I can reproduce this, confirming. However it's just the plug-in
that crashes, not gimp.

Comment 2 Vladimir Savic 2006-10-23 22:40:32 UTC
True. Well, sort of...
It's true that only plugin crashes, but I can reproduce that crash with any layer smaller then background.
Comment 3 Michael Natterer 2006-10-23 22:55:16 UTC
Ok, updating summary.
Comment 4 Michael Schumacher 2006-10-23 23:31:10 UTC
I don't get a segmentation fault on Windows, but the result isn't correct either; for layers < image size and layers with an offset.
Comment 5 Aurimas Juška 2006-12-01 16:02:33 UTC
Created attachment 77491 [details] [review]
filmstrip fixes

Fixes crash when opening layers with offsets and/or smaller than image. Correctly deals with transparent pixels. Coding style improvements.
Comment 6 Simon Budig 2006-12-01 16:53:53 UTC
Thanks for the patch, very welcome.

A few hints: you have replaced the scale_image thing with some calls to gimp-internal functions, which seems like a very good idea indeed.

When reading a patch it usually is more helpful, when the patch (at first) focusses on the functional aspects, or is in two different patches for the functional bits and the codingstyle bits. I have helped myself by applying the patch and reading the output of cvs diff -w, which helps a lot already since it omits most pure whitespace changes.

In Line 545 you work on the pixel region pixel_rgn_dst, which seems uninitialized to me in this part of the if() clause, please look at this again (also, assuming that bpp is 4 resp. 3 is ugly, better query the real bpp first).

This probably can be omitted anyway: this copying&pasting of layer content that is done there might be easier to do with gimp_layer_new_from_drawable(), this chould simplify the code drastically.

Please review this patch, I'll be glad to apply it if these points get fixed.

Thanks a lot for your help!
Comment 7 Simon Budig 2006-12-01 17:08:35 UTC
Ah sorry, I was not careful enough when looking at the pixelregion stuff. It gets initialized. Seems I need to read that stuff again.
Comment 8 Aurimas Juška 2006-12-01 18:50:37 UTC
Created attachment 77502 [details] [review]
filmstrip fixes (changed)

Previous patch changed according to recommendations.
Comment 9 Sven Neumann 2006-12-01 20:45:24 UTC
Very nice work, thanks a lot!

2006-12-01  Sven Neumann  <sven@gimp.org>

        * plug-ins/common/film.c: applied patch from Aurimas Juška. Fixes
        crash when opening layers with offsets and/or smaller than image
        (bug #364429).