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 604078 - Crash when pressing Backspace with Free Select Tool
Crash when pressing Backspace with Free Select Tool
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
2.6.7
Other All
: Normal critical
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-12-08 14:25 UTC by Pedro Villavicencio
Modified: 2009-12-09 21:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Bug-604078-Crash-when-pressing-Backspace-with-Free-S.patch (1.18 KB, patch)
2009-12-08 21:32 UTC, Martin Nordholts
committed Details | Review

Description Pedro Villavicencio 2009-12-08 14:25:35 UTC
this report has been filed here:

"while the selecting the crop tool application hang."

".

Thread 1 (process 5472)

  • #0 gimp_free_select_tool_revert_to_last_segment
    at /build/buildd/gimp-2.6.7/./app/tools/gimpfreeselecttool.c line 467
  • #1 gimp_free_select_tool_remove_last_segment
    at /build/buildd/gimp-2.6.7/./app/tools/gimpfreeselecttool.c line 495
  • #2 gimp_free_select_tool_key_press
    at /build/buildd/gimp-2.6.7/./app/tools/gimpfreeselecttool.c line 1430
  • #3 gimp_display_shell_canvas_tool_events
    at /build/buildd/gimp-2.6.7/./app/display/gimpdisplayshell-callbacks.c line 1381
  • #4 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmarshalers.c line 84
  • #5 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #6 ??
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #9 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkwidget.c line 4767
  • #10 IA__gtk_window_propagate_key_event
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkwindow.c line 5144
  • #11 gimp_window_key_press_event
    at /build/buildd/gimp-2.6.7/./app/widgets/gimpwindow.c line 72
  • #12 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmarshalers.c line 84
  • #13 ??
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #15 ??
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #18 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkwidget.c line 4767
  • #19 IA__gtk_propagate_event
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c line 2391
  • #20 IA__gtk_main_do_event
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c line 1622
  • #21 ??
    from /usr/lib/libgdk-x11-2.0.so.0
  • #22 g_main_context_dispatch
    from /lib/libglib-2.0.so.0
  • #23 ??
    from /lib/libglib-2.0.so.0
  • #24 g_main_loop_run
    from /lib/libglib-2.0.so.0
  • #25 app_run
    at /build/buildd/gimp-2.6.7/./app/app.c line 246
  • #26 main
    at /build/buildd/gimp-2.6.7/./app/main.c line 406

Comment 1 Sven Neumann 2009-12-08 19:40:01 UTC
Could you update to GIMP 2.6.7 and check if the problem can still be reproduced?
Comment 2 Sven Neumann 2009-12-08 19:46:25 UTC
No need ,the bug is still there. gimp_free_select_tool_remove_last_segment() doesn't check if priv->n_segment_indices is already 0 before it decrements the number of indices. Thus it ends up calling gimp_free_select_tool_revert_to_last_segment() with n_segment_indices set to -1.

And why the heck is this code reimplementing GArray?
Comment 3 Martin Nordholts 2009-12-08 21:24:18 UTC
Indeed, the step-by-step to reproduce is very easy:

1. Select the Free Select Tool
2. Press backspace

Amazing how no one reported this yes, thanks a lot Pedro. I don't think I had a good reason not to use GArray, the code just evolved in that direction. No point in changing that now though.
Comment 4 Martin Nordholts 2009-12-08 21:32:11 UTC
Created attachment 149370 [details] [review]
0001-Bug-604078-Crash-when-pressing-Backspace-with-Free-S.patch
Comment 5 Sven Neumann 2009-12-09 21:42:25 UTC
Committed to both branches. Closing as FIXED.