STR #3384

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

Return to Bugs & Features | Roadmap 1.3 ]

STR #3384

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:Core Library
Summary:setting up an offscreen area crashes when no Window exists yet (X11 only)
Created By:meixner
Assigned To:AlbrechtS
Fix Version:1.3.6
Fix Commit:0c70362e63d647bf633befde54362c329bd1c592
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files

Trouble Report Comments:

Name/Time/Date Text top right image
#1 meixner
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()
#2 AlbrechtS
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
#3 AlbrechtS
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).
bottom left image   bottom right image

Return to Bugs & Features ]


Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.