Can you replicate any crashes in the test
apps?
If not, but sure sounds like your app is building against
mismatched versions of fltk, or there are stale .o files
compiled against a different version than the new fltk.
To rule out interference between old and new releases, this may
sound obvious, but be sure you've:
Any one of those things could cause a
crash in strange places, and bisecting your way back to solve
might just mean whatever header file had changes in the newer
fltk releases was reverted back to a binary compatible release
that some old stale .o files were compiled with, so that "bisect
solves the problem" might be a red herring.
I tried updating to 1.4.1 today and ran into a problem. I've bisected it down to
3922ef67c1385 Further accelerating Fl_Text_Display (#596) Matthias Melcher
[..]
Without seeing the code that generates the crash, I'll have a will guess here. It seems that [Inlined] fl_font() fl_draw.H:812 is the last running code location. It's possible that you change some widget size based on the width of a string, but the graphics driver is not yet initialized. Please try to call fl_open_display() before you construct the GUI and see if the crash goes away.FLTK 1.4 is a bit more reluctant to open a display connection unless absolutely necessary. This is really helpful when you write apps that run without GUI as well as in interactive mode, making it possible to run apps on "headless" Linux machines. The disadvantage is, that graphics calls are not available until a window is actually shown (or fl_open_display() is called).
Can you replicate any crashes in the test apps?
If not, but sure sounds like your app is building against mismatched versions of fltk, or there are stale .o files compiled against a different version than the new fltk.
To rule out interference between old and new releases, this may sound obvious, but be sure you've:
- Made a clean checkout of 1.4.x current in an empty directory (git clone)
- Modified your app to refer to this clean checkout directory
- Do a clean rebuild of your app (making sure no .o's for your app are left over from a previous build of fltk)
- Make sure you're not linking to an old fltk lib
- Make sure there's no old links in /usr/include/FL (pointing to an old or different FLTK version)
Any one of those things could cause a crash in strange places, and bisecting your way back to solve might just mean whatever header file had changes in the newer fltk releases was reverted back to a binary compatible release that some old stale .o files were compiled with, so that "bisect solves the problem" might be a red herring.
Is there an easy way to run all the test programs in sequence?
$ for f in bin/test/* ; do echo "-- $f --"; $f; done -- bin/test/adjuster -- -- bin/test/animated -- -- bin/test/arc -- -- bin/test/ask -- ^CI'm doing this regularly to check for memory errors in my Address Sanitizer build. In the simplest for you just hit Esc but some programs need a little more "work" to exit.
I'm building with RelWithDebugInfo settings -- so my debug location might not be 100% accurate.
811 inline Fl_Font fl_font() { 812 return fl_graphics_driver->font(); 813 }which indicates clearly that something in your program calls fl_font() and that the display has not yet been opened (fl_graphics_driver is presumably NULL).
I call Fl_Tabs::client_area
I'm satisfied that calling fl_open_display(); is a reasonable fix (though possibly undocumented as a requirement).