Re: Segmentation fault in gtk2-perl-application
- From: muppet <scott asofyet org>
- To: Stephan Brunner <stephan brunner gmx de>
- Cc: gtk-perl-list gnome org
- Subject: Re: Segmentation fault in gtk2-perl-application
- Date: Wed, 30 Mar 2005 21:33:06 -0500
On Mar 30, 2005, at 4:59 PM, Stephan Brunner wrote:
Of course, I do much more trust the libraries than I trust my own code,
Good -- you understand the principle of "select() is not broken". :-)
but I'm only used to *dying* perl scripts (with file, line no. and
error message); I never encountered a *segfault* with any perl
script!?
Usually this happens as a result of getting the underlying code into an
odd state.
I would be very glad if you could help me out with this issue by
giving advice on where and how to start investigating what's going
(wr)on(g) in my application. Of course, I am happy to provide you any
information needed;
What versions of gtk+, glib, Gtk2, and Glib are you using? what
OS/dist?
Beyond that, seeing the code is really going to be necessary.
not knowing what information might help, I only attached the output of
gdb for a "bt" command.
the backtrace was very useful, in that it points out that error is
occurring deep inside gtk+, in a function that should not really have
any cause to generate a segfault. this usually means there is memory
corruption somewhere.
If you're on an x86 system, please try running your program with
valgrind. Don't be surprised by "still reachable" leaks (glib has lots
of memory that it assumes lives for the life of the program and
therefore doesn't clean up) and some "jump on uninitialized value"
errors from within Xlib; watch for errors that occur when you trigger
your callback. If you find something, generate and capture the output
with --num-callers=50 --- gtk+ applications' stacks tend to be very
deep, and the defaults only show 5 stack frames.
(gdb) bt
#0 0x40769d9c in gtk_path_bar_get_type () from
/usr/lib/libgtk-x11-2.0.so.0
#1 0x402d6ddc in g_main_context_wakeup () from
/usr/lib/libglib-2.0.so.0
this is really curious; why would a get_type() function be called
directly from g_main_context_wakeup()? this reeks of stack corruption,
or at the very least heap corruption (getting the wrong pointer in an
event source).
--
"Ghostbusters" is the best movie of this decade.
-- Neal, circa 1996, referring to a movie released in 1984.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]