Re: Bug in GLib, libglade, libc??



First of all, I highly doubt the bug is in libc or libxml. Most of the
time bugs like these are the result of bad code in the application (as
in not following the API, passing bad pointers and such) and although
libglade and gtk should not let these things fall through, the fault
is probably not with them either. (Of course, I could be totally wrong
:-) Could you post some code from the application? Otherwise, look for
the part of the stack trace that contains code from your program,
which could lead to more insight.
Cheers,
Samuel

On 8/11/06, Fabricio Rocha <rocha_fabricio yahoo com br> wrote:
Folks,

        There is an application which pops up a dialog, fills its widgets, etc
(no user input until now). I usually can exit the program normally
(already implemented a "really quit?" dialog and such).

        However, suddenly (without updating anything in the system) the program
started hanging sometimes. It works perfectly very often, but sometimes
will crash doing the same things, and those crashes are different.
Running it from Anjuta´s debugger (gdb in fact), sometimes the program
will have a Segmentation Fault just before opening the dialog ("called"
from a button in the main window) with this message:

0xb741ff55 in malloc_usable_size() from /lib/tls/libc.so.6

        and the following lines from the stack trace:

free() from /lib/tls/libc.so.6
malloc() from /lib/tls/libc.so.6
xmlDictCreate () from /usr/lib/libxml2.so.2
xmlInitParserCtxt () from /usr/libxm2.so.2
.... (lots of other libxml calls here)
xmlSAXUserParseFile () from /usr/lib/libxml2.so.2
glade_parser_parse_file () from /usr/lib/libglade-2.0.so.0
glade_xml_construct ()
glade_xml_new () from usr/lib/libglade-2.0.so.0


        However, sometimes the program will crash when EXITING, like this:

Program received signal SIGABRT, Aborted.
0xb7378947 in raise() from /lib/tls/libc.so.6

        ...and a stack trace like this:

abort() from lib/tls/libc.so.6
_fsetlocking () from lib/
mallopt() from lib/
free () from /lib/tls/
g_free () from usr/lib/libglib-2.0.so.0
g_object_add_weak_pointer () from usr/lib/libgobject-2.0.so.0
g_datalist_id_set_data_full () from /usr/lib/libglib
g_object_get_qdata () from libgboject
gtk_object_destroy () libgtk-x11-2.0.so.0
gtk_widget_hide () from libgtk
...

        QUESTION: This is quite mysterious for me. If the program runs fine a
lot of times, it does not look a bug in the code itself. Could it be a
bug in libc malloc and free, or in libxml, or in libglade?? Maybe in the
kernel itself? Or should I give an special attention to the pointers in
the application (and HOW could I do it)?

        For information, here are the versions. I run a Debian GNU-Linux system.
        - libc6 2.3.6-19
        - libglade2 (and libglade2-dev) 2.6.0-2
        - libgtk 2.8.18-7
        - libxml 2.6.26.dfsg-1

        So... any tips?

Regards!

Fabricio Rocha
Brasilia, Brasil


_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale
o discador agora!
http://br.acesso.yahoo.com
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]