Heads up the --sync command line option has been removed from gtk/gdb backend

"Jóhann B. Guðmundsson" johannbg at gmail.com
Tue Feb 22 12:43:31 UTC 2011


Just a heads up since I came across this while debugging that the --sync 
command line option has been deprecated [1] so to provide meaningful 
backtrace to maintainers in atleast F15 and onwards you will need to 
set  "GDK_SYNCHRONIZE" environmental to "1" which will make GDK make all 
X requests synchronously.

To simplify this a bit when you see msg like this ( which is deprecated )..

($Application:19057): Gdk-WARNING **: The program '$Application' 
received an X Window
System error.
This probably reflects a bug in the program.
   The error was 'BadWindow (invalid Window parameter)'.
   (Details: serial 473436 error_code 3 request_code 42 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.)

You will now need to do..

$ su -c 'debuginfo-install $Application'

$ GDK_SYNCHRONIZE=1 gdb -q $Application
Reading symbols from /usr/bin/$Application...Reading symbols from 
/usr/lib/debug/usr/bin/$Application.debug...done.
done.
(gdb) set logging on
Copying output to gdb.txt.
(gdb) run
Starting program: /usr/bin/$application
[Thread debugging using libthread_db enabled]
<$foo error>
(gdb) thread apply all bt full
(gdb) quit

or the gdb cli $magic

$ gdb -q $Application --ex "set logging on" --ex "r"

And attach gdb,txt to your report.

What once was but is no more is...

$ gdb -q $Application
Reading symbols from /usr/bin/$Application...Reading symbols from 
/usr/lib/debug/usr/bin/$Application.debug...done.
done.
(gdb) set logging on
Copying output to gdb.txt.
(gdb) run --sync
Starting program: /usr/bin/$application
[Thread debugging using libthread_db enabled]
<$foo error>
(gdb) thread apply all bt full
(gdb) quit

or the gdb cli $magic

$ gdb $Application --ex "set logging on" --ex "r --sync"

JBG

1.http://mail.gnome.org/archives/commits-list/2010-December/msg07793.html


More information about the test mailing list