GNOME Bugzilla – Bug 340422
Extract foreground makes GIMP segfault
Last modified: 2006-08-29 14:46:36 UTC
Steps to reproduce: 1. Select the ``Extract foreground object'' tool 2. Draw some random patterns with the tool 3. Press Enter 4. Move the selection 5. Draw some random patterns with the tool 6. Draw again some patterns with the tool Stack trace:
+ Trace 67985
Other information:
Right, moving the selection between multiple uses of the tool seems to trigger a bug.
raising priority and severity since it is important to fix this for the upcoming 2.4 release.
valgrind gave me this, after recompiling siox.c without optimization: ==13453== Invalid read of size 2 ==13453== at 0x824E8CE: tile_ewidth (tile.c:289) ==13453== by 0x824AFC3: pixel_regions_register (pixel-region.c:353) ==13453== by 0x824CEFA: siox_foreground_extract (siox.c:1117) ==13453== by 0x81C6435: gimp_drawable_foreground_extract_siox (gimpdrawable-f oreground-extract.c:151) ==13453== by 0x80C41B7: gimp_foreground_select_tool_select (gimpforegroundsel ecttool.c:654) ==13453== by 0x80C4508: gimp_foreground_select_tool_button_release (gimpforeg roundselecttool.c:475) ==13453== by 0x80A1B96: gimp_display_shell_canvas_tool_events (gimpdisplayshe ll-callbacks.c:802) ==13453== by 0x1BB3FF6A: _gtk_marshal_BOOLEAN__BOXED (gtkmarshalers.c:83) ==13453== by 0x1BE45951: g_closure_invoke (gclosure.c:492) ==13453== by 0x1BE53B3A: signal_emit_unlocked_R (gsignal.c:2485) ==13453== by 0x1BE54C13: g_signal_emit_valist (gsignal.c:2254) ==13453== by 0x1BE551EA: g_signal_emit (gsignal.c:2288) ==13453== Address 0x8 is not stack'd, malloc'd or (recently) free'd There were no preceding errors that looked relevant.
I found that this just happen if using Siox, and there is floating selection in project.
Please use Milestone + Priority==Urgent instead of Severity==Blocker.
I've investigated this a bit more, and found that the crash does not really have anything to do with floating selections -- the crash happens in stage 2 of the siox algorithm, if the freehand curve drawn in stage 1 extends outside the bounds of the layer that siox is acting on.
2006-08-29 Sven Neumann <sven@gimp.org> * app/base/siox.c: use gimp_rectangle_intersect() to reduce the working area to the region of interest. Fixes bug #340422.