[ Return to Bugs & Features | Roadmap 1.3 ]
|Status:||1 - Closed w/Resolution|
|Priority:||3 - Moderate, e.g. unable to compile the software|
|Scope:||2 - Specific to an operating system|
|Summary:||setting up an offscreen area crashes when no Window exists yet (X11 only)|
Trouble Report Files:
Trouble Report Comments:
06:09 May 17, 2017
|The graphics context fl_gc is set up during creation of the first window. Therefore, when creating an offscreen area before setting up the first window, XSetClipMask is invoked with fl_gc==NULL which results in a crash. |
Call stack is:
fl_begin_offscreen() => fl_push_no_clip() => Fl_Graphics_Driver::push_no_clip() => fl_restore_clip() => Fl_Graphics_Driver::restore_clip() => XSetClipMask()
07:07 May 17, 2017
|Thanks for the report, but FLTK 1.3.3 is a very old release. |
Please test at least 1.3.4 or - much better - a current snapshot of FLTK 1.4.0. ISTR that something similar to what you report has been fixed, although I'm not sure about the details. In FLTK 1.4.0 offscreen drawing has undergone a major redesign.
If you find that the bug still exists in FLTK 1.3.4 and/or 1.4.0: please post a minimal, but complete (compilable) demo program that exhibits the bug. Use the 'Post File' link. This will make it much easier to find the bug (if it still exists). TIA
03:13 Nov 03, 2020
|Fixed in Git repository. |
The crash could be seen in FLTK 1.3.x only. FLTK 1.4 works fine - the entire offscreen drawing had already been rewritten.
The committed fix is now in FLTK 1.3 (Git) and will be in the next release (likely 1.3.6). There's no release schedule yet.
In FLTK 1.3 you still have to call fl_open_display() if you want to use offscreen drawing functions prior to showing (and drawing) windows. This implementation has been chosen to avoid to open the display for *every* offline drawing. This is now documented in chapter "Drawing Things" of the documentation (in Git).
[ Return to Bugs & Features ]