Bug in gtk 1.2.8 in advance_mark_n()



Attached is the gdb backtrace, let me explain a few things first though.

I have a function ViewerTextInsert() that freezes a GtkText and then calls
gtk_text_insert() and gtk_text_backward_delete() in varying order and
combination, while in between calling my function ViewerLoadProgressCB()
which in there has a:

        while(gtk_events_pending())
            gtk_main_iteration();

Its at that point where the crash occures (as you can see from the
attached gdb backtrace).

gtk_text_insert(), gtk_text_backward_delete(), and ViewerLoadProgressCB()
are all called in a while() loop in ViewerTextInsert().

So apparently the fix was to first call:

        while(gtk_events_pending())
            gtk_main_iteration();

        while()
        {
            gtk_text_insert();
            gtk_text_backward_delete();
            ViewerLoadProgressCB();
        }

*Before* freezing the GtkText and entering the while() loop.

If anyone would like to see my complete sources for the two functions in
question please write back.


#0  0x400eaac0 in advance_mark_n ()
#1  0x400eda39 in draw_line ()
#2  0x400ee146 in expose_text ()
#3  0x400e7b94 in gtk_text_expose ()
#4  0x400a6cc9 in gtk_marshal_BOOL__POINTER ()
#5  0x400d3ccb in gtk_signal_real_emit ()
#6  0x400d1d95 in gtk_signal_emit ()
#7  0x40106c8c in gtk_widget_event ()
#8  0x400a5f1a in gtk_main_do_event ()
#9  0x4015053b in gdk_event_dispatch ()
#10 0x40181186 in g_main_dispatch ()
#11 0x40181751 in g_main_iterate ()
#12 0x40181804 in g_main_iteration ()
#13 0x400a59ed in gtk_main_iteration ()
#14 0x806ce35 in ViewerSetStatusProgress (v=0x80df910,
percent=0.112791173)
    at viewer.c:928
#15 0x806d889 in ViewerLoadProgressCB (cur=276, max=2447, data=0x80df910)
    at viewerfio.c:44
#16 0x806baf7 in ViewerTextInsert (v=0x80df910, 
    buf=0x81180e8 "\n\n\nYlib(3)", ' ' <repeats 14 times>, "Ylib Function
Interface", ' ' <repeats 14 times>, "Ylib(3)\n\n\nN\bNA\bAM\bME\bE\n
YOpenConnection - connect to Y server\n\nS\bSY\bYN\bNT\bTA\bAX\bX\n
#include <Y2/Y.h>\n       #include <Y2/Ylib.h"..., buf_len=2447,
client_data=0x80df910, 
    func_cb=0x806d840 <ViewerLoadProgressCB>) at viewer.c:162
#17 0x806d9d8 in ViewerLoadFile (v=0x80df910, 
    filename=0x80f5140 "/home/learfox/projects/xsw1.33i/manedit/output")
    at viewerfio.c:119
#18 0x806d271 in ViewerOpenCB (widget=0x80eb008, data=0x80df910)
    at viewercb.c:131





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