Re: [patch] fixes numerous glib faults and mistypes, also re-whitespaced



(Note this e-mail being forwarded to the GTK+ app devel list, anyone who
has any idea on what might cause this glib behavour please reply!)


Erf, goodness!  This is really awkward.

I have a hunch, what if instead, you reverted back to the original source
and instead just change all occurances of strdup() to gstrdup() (or
whatever its equiv is?)

For everyone else the source for this GTK+ app in question is at:

        ftp://fox.mit.edu/pub/xsw/manedit0.4.tgz


<--- Original message --->

<breakpoints set at all foreach functions>

(gdb) r
Starting program: /usr/src/manedit0.4/manedit/./manedit

Breakpoint 6, FileBrowserInit () at fb.c:358
358             g_list_foreach(glist, (GFunc)g_free, NULL);

(gdb) n

GLib-WARNING **: freeing previously freed (16 times) memory

359             g_list_free(glist);
(gdb) n
360             gtk_widget_show(w);
(gdb) c
Continuing.

<open file button pressed>

Program received signal SIGSEGV, Segmentation fault.
0x4036249b in chunk_free (ar_ptr=0x403faca0, p=0x81a84f0) at malloc.c:3142
3142    malloc.c: No such file or directory.
        in malloc.c

#0  0x4036249b in chunk_free (ar_ptr=0x403faca0, p=0x81a84f0) at malloc.c:3142
#1  0x40362323 in __libc_free (mem=0x81a84f8) at malloc.c:3054
#2  0x0806f17e in FileBrowserGetResponse (title=0x80c6b3e "Open Manual Page",
    ok_label=0x80c6b39 "Open", cancel_label=0x80c6abf "Cancel",
    path=0x8379bd8 "/tmp", type=0x822f3c8, total_types=3, path_rtn=0xbfffe918,
    path_total_rtns=0xbfffe91c, type_rtn=0xbfffe920) at fb.c:449
#3  0x08060fb2 in EditorManualOpenCB (widget=0x827b910, data=0x82845e0)
    at editorcb.c:727
#4  0x400ccc5a in gtk_marshal_NONE__NONE (object=0x827b910,
    func=0x8060f24 <EditorManualOpenCB>, func_data=0x82845e0, args=0xbfffea34)
    at gtkmarshal.c:312
#5  0x40101635 in gtk_handlers_run (handlers=0x824dfd0, signal=0xbfffe9e0,
    object=0x827b910, params=0xbfffea34, after=0) at gtksignal.c:1917


fb.c:358 commented out:

(gdb) r
Starting program: /usr/src/manedit0.4/manedit/./manedit

<open file button pressed>


GLib-WARNING **: freeing previously freed (16 times) memory


GLib-WARNING **: freeing previously freed (24 times) memory


GLib-WARNING **: freeing previously freed (16369152 times) memory


Program received signal SIGSEGV, Segmentation fault.
0x4036249b in chunk_free (ar_ptr=0x403faca0, p=0x839bb28) at malloc.c:3142
3142    malloc.c: No such file or directory.
        in malloc.c

As is evidenced, all is not well but we get past the first segfault simply by
commenting on the foreach free action.





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