| [ Return to Bugs & Features | SVN ⇄ GIT ]
STR #3484
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 4 - High, e.g. key functionality not working |
Scope: | 2 - Specific to an operating system |
Subsystem: | Core Library |
Summary: | FLTK 1.4 crash on Windows at program exit |
Version: | 1.4-feature |
Created By: | geuzaine.acm.caltech |
Assigned To: | AlbrechtS |
Fix Version: | 1.4.0 (SVN: v13007) |
Fix Commit: | 339ba4c8b307f025c5ef8999f8539656057d69b7 |
Update Notification: | |
Trouble Report Files:
|
#1 | geuzaine.acm.caltech 10:20 Aug 05, 2018 |
| fix.patch 1k | |
Trouble Report Comments:
|
#1 | geuzaine.acm.caltech 10:20 Aug 05, 2018 |
| On Windows, if an FLTK 1.4 app does not create a window (e.g. an FLTK app that also provides a batch mode), the app crashes in fl_brush_action().
To trigger the issue, apply the following patch (which forces the cube.exe test to return early) to FLTK 1.4 and run cube.exe:
Index: test/cube.cxx =================================================================== --- test/cube.cxx (revision 13005) +++ test/cube.cxx (working copy) @@ -178,6 +178,8 @@ // end of printing demo
int main(int argc, char **argv) { + // return here to trigger fl_brush_action bug + return 0; Fl::use_high_res_GL(1); makeform(argv[0]); // added to demo printing
It crashes reliably on both Windows 7 and Windows 10, with both MSCV 2017 and GCC.
Attached is a patch that fixes the issue. I'm not sure if this is the right patch, though...
Christophe | |
|
#2 | AlbrechtS 09:57 Aug 06, 2018 |
| Fixed in Subversion repository.
Thanks for the report and the patch.
It turned out that I had already found the issue long ago and prepared a slightly different patch, but never committed. I committed it now in svn r13007.
My patch fixes the issue before fl_brush_action(1) is called (at program exit) and avoids a comparison when fl_brush_action(0) is called during program execution.
Please confirm that this works for you. TIA. | |
|
#3 | AlbrechtS 09:58 Aug 06, 2018 |
| Note: I changed the subject (added "at program exit") for later reference. | |
|
#4 | geuzaine.acm.caltech 22:19 Aug 06, 2018 |
| I confirm that the problem is fixed in the latest SVN. Thanks! | |
|
#5 | AlbrechtS 23:52 Aug 06, 2018 |
| Fixed in Subversion repository.
Thanks for confirmation. Closed w/Resolution. | |
|
#6 | AlbrechtS 06:54 Aug 22, 2022 |
| For the record: the original fix was in svn r13007 which is now in Git master (1.4.0), commit 339ba4c8b307f025c5ef8999f8539656057d69b7.
The fix has been backported today to Git branch-1.3 in commit 40b82358ed3315b5ed6cdaae959e00348b165ad3 (after release 1.3.8).
It is available in Git and will be in release 1.3.9 if this will be released. | |
[ Return to Bugs & Features ]
|
| |