DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2797
Version: 1.3-current


Just some additional notes culled from the ref'd thread:

It appears, based on testing by the OP (David) and by me, that the crux
may be in the Fl_Double_Window flush() method.

If XDBE is inhibited, then at line 338 of r9209, we have an fl_offscreen
created for the double buffer, which is then assigned to other_xid:

       myi->other_xid = fl_create_offscreen(w(), h());

Now, it is clear that the offscreen is created without first checking that
the dimensions are non-zero, and that appears to be what triggers the
subsequent crash...

David's workaround was to do:

   myi->other_xid = ( w() && h() ? fl_create_offscreen(w(),h()) : 0 );

instead, i.e. only create the offscreen surface for the double buffering
of the window if the window has non-zero size. Otherwise, other_xid is set
to NULL.

It looks like *most* other places where other_xid is used, it is checked
for being NULL first, so this ought to be safe.

David reports good results with this workaround in his tests, though I was
initially sceptical. 
I'm now of the opinion that this workaround is probably good, though we
need to check there are no places where other_xid is actually used without
first being checked for NULL, just to be sure!


Link: http://www.fltk.org/str.php?L2797
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to