• 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
X11 debugging pt.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

X11 debugging pt.1


  • Subject: X11 debugging pt.1
  • From: Ben Byer <email@hidden>
  • Date: Wed, 07 Nov 2007 02:57:45 -0800

I tried to send this yesterday to the list, but my message got rejected by the mailing list software for being "too big" at 43K.  So, I'll try sending it a bit at a time.

(This tutorial / "walkthrough" assumes at least a basic familiarity with compiling programs using GNU autoconf and with using GDB to get backtraces for crashes.  If you have no experience in this error, feel free to follow along anyway, if you're curious; if you run into problems, go and find a real GDB tutorial and come back to this; if you still have trouble, I can help you. For those seasoned developers out there, I'd welcome suggestions for a better approach to debugging this issue.)

On OS X 10.5, gcc now uses something known as "DWARF" debugging symbols. I was unable to find a good, succinct summary of what that means, but I'll try to explain by example.

I've been trying to debug the Gimp crash seen by Michael Thorn, and others.  The symptom is that if you run Gimp 2.4rc3, create a blank canvas, and click and drag to draw a black paintstroke, it will often crash.

$ curl -LO http://internap.dl.sourceforge.net/sourceforge/gimp-app/GIMP-2.4-rc3-intel.dmg
$ open GIMP-2.4-rc3-intel.dmg

At this point, I recommend you open up two Terminal windows -- one in which to run Gimp (so you can see console output), and the other to eventually run gdb.

$ /Volumes/GIMP/Gimp.app/Contents/Resources/bin/gimp
You'll see many error messages scroll by while Gimp starts; these are "harmless", or at least don't seem to pertain to the issue at hand.

Once Gimp starts, go to File, New, click OK, click on the canvas, and drag.  CRASH

You'll see this in the Terminal window:
The program 'gimp-2.4' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
   (Details: serial 57392 error_code 3 request_code 39 minor_code 0)
   (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the --sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error() function.)

Okay, let's do what it's asking us to do.

 _______________________________________________
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:
    • Re: X11 debugging pt.2
      • From: Ben Byer <email@hidden>
  • Prev by Date: Re: Xvfb linking (Was Re: X11 source code: structure, building)
  • Next by Date: Re: X11 debugging pt.2
  • Previous by thread: Re: X Forwarding via ssh
  • Next by thread: Re: X11 debugging pt.2
  • Index(es):
    • Date
    • Thread