• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: X11 debugging pt.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: X11 debugging pt.2


  • Subject: Re: X11 debugging pt.2
  • From: Ben Byer <email@hidden>
  • Date: Wed, 07 Nov 2007 03:04:41 -0800

Restart Gimp, but stop after it loads:
$ /Volumes/GIMP/Gimp.app/Contents/Resources/bin/gimp --sync

Meanwhile, in the other window, start gdb:
$ ps uaxw | grep gimp-2.4
bbyer     7960   0.0  0.0   599820    464 s000  R+    1:33AM   0:00.00 grep gimp-2.4
bbyer     7920   0.0  0.8   109148  24568 s002  S+    1:32AM   0:01.80 /Volumes/GIMP/Gimp.app/Contents/Resources/bin/gimp-2.4 --system-gimprc=/tmp/502/TemporaryItems/gimprc --sync
$ gdb attach 7920
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct  2 04:07:49 UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...attach: No such file or directory.

/Volumes/Data/Users/bbyer/7920: No such file or directory.
Attaching to process 7920.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ......................................................................................................................... done
0x96bb9b4e in select$DARWIN_EXTSN$NOCANCEL ()

Set a breakpoint on gdk_x_error, and continue (unfreeze Gimp):
(gdb) break gdk_x_error
Breakpoint 1 at 0xa45294
(gdb) cont
Continuing.

Now, cause Gimp to crash using the above steps.
Instead of disappearing when it crashes, the Gimp window will just freeze, and you'll be dropped back into the GDB prompt in your second Terminal window:

Reading symbols for shared libraries .. done

Breakpoint 1, 0x00a45294 in gdk_x_error ()

The 'where' command will show you the backtrace of the crash:
(gdb) where
#0  0x00a45294 in gdk_x_error ()
#1  0x00c82c14 in _XError ()
#2  0x00c848d1 in _XReply ()
#3  0x00c63c52 in XGetMotionEvents ()
#4  0x00a4144f in gdk_device_get_history ()
#5  0x00170f25 in gimp_display_shell_canvas_tool_events ()
#6  0x006c4ae2 in _gtk_marshal_BOOLEAN__BOXED ()
#7  0x00f3766f in g_closure_invoke ()
#8  0x00f489a1 in signal_emit_unlocked_R ()
#9  0x00f498db in g_signal_emit_valist ()
#10 0x00f4a1fb in g_signal_emit ()
#11 0x00834979 in gtk_widget_event_internal ()
#12 0x00834415 in gtk_widget_event ()
#13 0x006c3170 in gtk_propagate_event ()
#14 0x006c1d26 in gtk_main_do_event ()
#15 0x00a39411 in gdk_event_dispatch ()
#16 0x00f99ef9 in g_main_context_dispatch ()
#17 0x00f9d40d in g_main_context_iterate ()
#18 0x00f9d7ad in g_main_loop_run ()
#19 0x000030e6 in app_run ()
#20 0x00004071 in main ()

Here is our stacktrace; it's not yet very useful.  I can tell you that gimp_display_shell_canvas_tool_events() called gdk_device_get_history(), which called XGetMotionEvents(), which then threw an error, causing the crash.  I have no idea *why*, nor where in the source code to look.  We need debugging symbols.  Quit GDB. 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      (email@hidden)

This email sent to email@hidden

  • Follow-Ups:
    • X11 debugging pt.3
      • From: Ben Byer <email@hidden>
References: 
 >X11 debugging pt.1 (From: Ben Byer <email@hidden>)

  • Prev by Date: X11 debugging pt.1
  • Next by Date: X11 debugging pt.3
  • Previous by thread: X11 debugging pt.1
  • Next by thread: X11 debugging pt.3
  • Index(es):
    • Date
    • Thread