1

My problem is the following: An application (namely eclipse) crashes on my machine, and shows the following error message:

The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 16911 error_code 3 request_code 3 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.)

Now what I want to do is to actually run gdb as suggested by the error message. However, I didn't succeed and no backtrace is displayed.

I haven't much experiences with debugging. Here is what I tried anyway:

1) Activate -dbgsym repositories
2) Install eclipse dbg symbols (command sudo apt-get install ^eclipse-.*dbgsym)
3) Install libgtk-3-0-dbg, libgtk2.0-0-dbg and all packages matched by ^libgdk.*dbg
4) Run gdb:

(gdb) file /usr/lib/eclipse/eclipse
Reading symbols from /usr/lib/eclipse/eclipse...
Reading symbols from /usr/lib/debug/.build-
id/c2/8e5f4ebdd67159093d8ee6e6daf58ab6fab94c.debug...done.
done.
(gdb) break gdk_x_error
Function "gdk_x_error" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
(gdb) run --sync

[Update] I also tried the following (without success):

1) - 3) same as above
4) Run gdb:

(gdb) file /usr/lib/eclipse/eclipse
Reading symbols from /usr/lib/eclipse/eclipse...
Reading symbols from /usr/lib/debug/.build-
id/c2/8e5f4ebdd67159093d8ee6e6daf58ab6fab94c.debug...done.
done.
(gdb) break main
Breakpoint 1 at 0x4010a0: file ../eclipseMain.c, line 101.
(gdb) run --sync
Starting program: /usr/lib/eclipse/eclipse --sync
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, main (argc=2, argv=0x7fffffffdf18) at ../eclipseMain.c:101
101 ../eclipseMain.c: file or directory not found.
(gdb) break gdk_x_error
Function "gdk_x_error" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
(gdb) cont

[/Update]

Result:

When the application crashes, the output is the same as above, no additional info is displayed. I assume that my approach is wrong, or I've loaded the wrong debug symbols. (Because it says "gdk_x_error" not defined.)

[Update2] When I type bt after the crash, it shows me No Stack. [/Update2]

What can I do to get a meaningful backtrace? Any ideas?

Community
  • 1
  • 1
manuel
  • 533
  • 6
  • 16
  • Is there a `-dbgsym` package for GTK+? I haven't used that repo in a while so I don't know for sure. – andlabs May 11 '15 at 21:05
  • @andlabs: There is both a `libgtk-3-0-dbg` and a `libgtk-3-0-dbgsym` package. (Same for gtk2) I only installed the `-dbg` because the linked topic says you can't have installed both at the same time. – manuel May 12 '15 at 08:38
  • What happens if you install the `-dbgsym` one instead? – andlabs May 12 '15 at 13:35
  • @andlabs: I managed to install `libgtk2.0-0-dbgsym` but that doesn't change anything. However, `libgtk-3-0-dbgsym` could not be installed, it says `Depends on libgtk-3-0-dbg (= 3.10.8-0ubuntu1.5) but 3.10.8-0ubuntu1.4 should be installed`. Strange. (Xubuntu 14.04) – manuel May 12 '15 at 16:40

0 Answers0