On Thu, 13 Nov 2008, MacArthur, Ian (SELEX GALILEO, UK) wrote:
>> Program received signal SIGSEGV, Segmentation fault.
>> [Switching to Thread 0xb7b026c0 (LWP 5133)]
>> 0x0806c5ee in Fl_Widget::visible (this=0x3) at ../FL/Fl_Widget.H:163
>> 163 int visible() const {return !(flags_&INVISIBLE);}
>> (gdb) bt
>> #0 0x0806c5ee in Fl_Widget::visible (this=0x3) at
>> ../FL/Fl_Widget.H:163
>> #1 0x080738ce in Fl_Group::draw_child (this=0x80bf3c8, [EMAIL PROTECTED])
>> at Fl_Group.cxx:577
>> the #0 line wasnt there before.
>> so it segfaults while its calling a method
>> int visible() const {return !(flags_&INVISIBLE);}
>>
>> of a widget that has adress 0x3 which again is not
>> accessable memory. now, my question would be:
My guess would be you're forgetting to initialize some
properties (specifically, a dynamically created child widget)
to NULL. Then, trying to draw the child while it isn't there (yet).
You may even be checking for NULL before calling draw, but without
init, the value of the propery could be anything (0x3, for instance).
The problem then is not in the child widget but in its parent.
This would also explain things 'sometimes' working: zero bytes are
fairly common, so if you've been as lucky as to have the uninitialized
property accidentally having been zero, things would appear to work
properly.
Still curious about that valgrind output ;)
Best,
Marc
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk