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 340422 - Extract foreground makes GIMP segfault
Extract foreground makes GIMP segfault
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Urgent major
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-05-02 17:17 UTC by Alexandre Vassalotti
Modified: 2006-08-29 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexandre Vassalotti 2006-05-02 17:17:33 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:
  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 g_on_error_stack_trace
    from /usr/lib/libglib-2.0.so.0
  • #3 g_on_error_query
    from /usr/lib/libglib-2.0.so.0
  • #4 gimp_eek
  • #5 gimp_fatal_error
  • #6 gimp_sigfatal_handler
    at main.c line 579
  • #7 <signal handler called>
  • #8 tile_ewidth
    at tile.c line 289
  • #9 pixel_regions_configure
    at pixel-region.c line 591
  • #10 pixel_regions_register
    at pixel-region.c line 353
  • #11 siox_foreground_extract
  • #12 gimp_drawable_foreground_extract_siox
  • #13 gimp_foreground_select_tool_select
  • #14 gimp_foreground_select_tool_button_release
  • #15 gimp_display_shell_canvas_tool_events
  • #16 _gtk_marshal_BOOLEAN__BOXED
  • #17 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #21 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #25 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #26 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #27 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #28 app_run
  • #29 main
    at main.c line 316


Other information:
Comment 1 Sven Neumann 2006-05-03 07:19:43 UTC
Right, moving the selection between multiple uses of the tool seems to trigger a bug.
Comment 2 weskaggs 2006-05-21 20:13:15 UTC
raising priority and severity since it is important to fix this for the upcoming 2.4 release.
Comment 3 weskaggs 2006-05-22 22:46:02 UTC
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.
Comment 4 vasaka 2006-06-21 08:42:59 UTC
I found that this just happen if using Siox, and there is floating selection in project.
Comment 5 Raphaël Quinet 2006-08-22 09:34:58 UTC
Please use Milestone + Priority==Urgent instead of Severity==Blocker.
Comment 6 weskaggs 2006-08-25 19:06:33 UTC
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.
Comment 7 Sven Neumann 2006-08-29 14:46:36 UTC
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.