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 342506 - New rect select tool crash
New rect select tool crash
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
git master
Other Linux
: Normal critical
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-05-21 18:45 UTC by Karine Delvare
Modified: 2006-05-23 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Karine Delvare 2006-05-21 18:45:37 UTC
Steps to reproduce:
- make a selection with the new rect select tool
- click inside it to turn it to the interactive rectangle interface
- click inside it, near a border to turn it back to a selection

Crash because of NULL display, didn't manage to understand it yet.

  • #0 gimp_new_rect_select_tool_execute
    at gimpnewrectselecttool.c line 319
  • #1 gimp_rectangle_tool_execute
    at gimprectangletool.c line 1752
  • #2 gimp_rectangle_tool_response
    at gimprectangletool.c line 1610
  • #3 gimp_new_rect_select_tool_button_release
    at gimpnewrectselecttool.c line 251
  • #4 gimp_display_shell_canvas_tool_events
    at gimpdisplayshell-callbacks.c line 802
  • #5 gtk_marshal_VOID__UINT_STRING
    from /usr/lib/libgtk-x11-2.0.so.0
  • #6 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_has_handler_pending
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #9 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #10 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #11 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #12 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #13 gdk_event_get_graphics_expose
    from /usr/lib/libgdk-x11-2.0.so.0
  • #14 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #15 g_main_context_acquire
    from /usr/lib/libglib-2.0.so.0
  • #16 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #17 app_run
    at app_procs.c line 359
  • #18 main
    at main.c line 316

Comment 1 weskaggs 2006-05-22 21:16:20 UTC
The cause of the problme is in lines 246-248 of gimpnewrectselecttool.c:

  gimp_rectangle_tool_button_release (tool, coords, time, state, display);
  if (function >= RECT_RESIZING_UPPER_LEFT && function <= RECT_RESIZING_BOTTOM)
    gimp_rectangle_tool_response (NULL, GIMP_RECTANGLE_MODE_EXECUTE, rectangle);

This causes gimp_rectangle_tool_response() to be executed twice whenever the mouse is near the edge, first via the button_release callback, then directly.  Since the first pass sets tool->display to NULL, the seond pass blows up.  I don't understand the purpose of these lines (it seems to have something to do with automatically creating a selection on button release), so I won't try to fix the problem at this moment.
Comment 2 Karine Delvare 2006-05-23 16:13:31 UTC
Thanks for your help!

2006-05-23  Karine Delvare  <edhel@gimp.org>

	* app/tools/gimpnewrectselecttool.c: don't execute
	gimp_rectangle_tool_response() twice. Fixes bug #342506.