mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Mon Oct 06, 2008 3:32 pm Post subject: question about debugging X apps with --sync [SOLVED] |
|
|
I'm trying to track down a bug in an app I wrote. After it runs for a while I receive an error that looks like this:
Code: | The program 'myapp' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadIDChoice (invalid resource ID chosen for this connection)'.
(Details: serial 765442671 error_code 14 request_code 53 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.)
|
I've been able to track the bug down to one argument in one line of my code, but it doesn't seem to make sense that multiple calls to this function would cause an X error.
The next logical debugging step is to actually do what they tell me to do in the error, but I'm confused on how to actually do this. I've been searching documentation trying to figure out where the --sync option should go, but haven't found anything.
My question, does --sync get passed to the X server, client, or my app itself? I know my app won't see the --sync, unless I need to build in a few hooks.
Any tips on debugging such an error?
Last edited by mikegpitt on Mon Oct 06, 2008 3:40 pm; edited 1 time in total |
|