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 165372 - Unsharp Mask crashes with a certain image & selection
Unsharp Mask crashes with a certain image & selection
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.2.x
Other All
: High normal
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-01-27 02:23 UTC by Ari Pollak
Modified: 2008-01-15 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for libgimp/gimpdrawablepreview.c (1.78 KB, patch)
2005-01-27 20:00 UTC, weskaggs
none Details | Review

Description Ari Pollak 2005-01-27 02:23:48 UTC
Please describe the problem:
From Debian bug report http://bugs.debian.org/292119

The file EuropeanParliament.xcf.bz2 located at
http://people.debian.org/~tille/tmp/ has a region selected. Without changing the
region, select the Unsharp Mask filter. The dialog pops up but immediately
exits, with the following printed on stderr:

(unsharp:15543): LibGimp-CRITICAL **: file gimppixelrgn.c: line 137
(gimp_pixel_rgn_init): assertion `x >= 0 && x + width <= drawable->width' failed

(unsharp:15543): LibGimp-CRITICAL **: file gimppixelrgn.c: line 381
(gimp_pixel_rgn_get_rect): assertion `x >= 0 && x + width <=
pr->drawable->width' failed

(unsharp:15543): LibGimp-CRITICAL **: file gimppixelrgn.c: line 138
(gimp_pixel_rgn_init): assertion `y >= 0 && y + height <= drawable->height' failed
/usr/lib/gimp/2.0/plug-ins/unsharp: fatal error: Segmentation fault


Apparently this operation works fine under gimp 2.0.6.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Michael Schumacher 2005-01-27 09:20:29 UTC
I can't reproduce this with 2.2.3 on Win32. The Debian bug you're linking to
doesn't seem to be related, too.
Comment 2 Raphaël Quinet 2005-01-27 09:46:56 UTC
It looks like the correct Debian bug report is: http://bugs.debian.org/292199
Comment 3 Sven Neumann 2005-01-27 16:58:59 UTC
I can reproduce the warnings. It doesn't crash for me but there must not be such
warnings, so we definitely need to fix this.
Comment 4 weskaggs 2005-01-27 17:24:54 UTC
Confirmed for current cvs.  The problem is in the preview code -- in this image,
the layer being operated on extends to the right and above the image boundaries.
 The line 

      gimp_pixel_rgn_init (&selection_rgn, gimp_drawable_get (selection_id),
                           x + offset_x, y + offset_y, width, height,
                           FALSE, FALSE);

from gimp_drawable_preview_draw_area() in gimpdrawablepreview.c (line 281) is
failing because initially x=0, y=0, offset_x=-2, offset_y=-2.
Comment 5 weskaggs 2005-01-27 20:00:55 UTC
Created attachment 36612 [details] [review]
patch for libgimp/gimpdrawablepreview.c

This fixes it for me, and looks like the right thing to do.
Comment 6 Sven Neumann 2005-01-28 11:45:54 UTC
Bill, please try to be a little more careful with Bugzilla. You probably didn't
mean to remove the 2.2 milestone.

Patch looks good to me, please apply it.
Comment 7 weskaggs 2005-01-28 17:30:50 UTC
My comment #4 collided with your comment #3.  Not realizing that you had done
anything other than make a comment, and not wanting to write mine all over
again, I confirmed that I wanted to submit the comment anyway -- that's how the
milestone got changed, I think.  For future collisions, I'll try to be alert to
this possibility.
Comment 8 Michael Schumacher 2005-01-28 17:58:46 UTC
Hint: modern browsers let the content of textareas survive reloads - and there
is cut&paste.
Comment 9 weskaggs 2005-01-28 18:18:52 UTC
Okay, committed to both branches.

2005-01-28  Bill Skaggs  <weskaggs@primate.ucdavis.edu>

	* libgimp/gimpdrawablepreview.c: set preview bounds correctly
	when previewed drawable extends beyond image edges, 
	fixes bug #165372.