This was reported against a relelase which depends on FLTK 1.4.4.
However, looking at the code through git lens, it appears to not have changed for nearly 27 years :)
It might be that some reentrant code is nullifying the `m` variable elsewhere in certain setups.
#0 0x00005cd18cb40182 in Fl_Menu_Item::activevisible (this=0x0)
at /path/to/fltk/src/../FL/Fl_Menu_Item.H:451
#1 0x00005cd18cb4370f in Fl_Menu_Item::pulldown
(this=0x5cd19bc3a470, X=760, Y=260, W=400, H=35, initial_item=0x0, pbutton=0x5cd19bbbfbb0, title=0x0, menubar=1)
at /path/to/fltk/src/Fl_Menu.cxx:1068
#2 0x00005cd18cb44dda in Fl_Menu_Bar::handle (this=0x5cd19bbbfbb0, event=1)
at /path/to/fltk/src/Fl_Menu_Bar.cxx:52
#3 0x00005cd18cb16085 in Widget_Derived<Fl_Sys_Menu_Bar>::handle (this=0x5cd19bbbfbb0, event=1)
at /path/to/include/cfl_widget.hpp:77
#4 0x00005cd18cb32d62 in send (o=0x5cd19bbbfbb0, event=1)
at /path/to/fltk/src/Fl_Group.cxx:96
#5 0x00005cd18cb334b7 in Fl_Group::handle (this=0x5cd19bbe6ab0, event=1)
at /path/to/fltk/src/Fl_Group.cxx:226
#6 0x00005cd18cb138ad in Widget_Derived<Fl_Pack>::handle (this=0x5cd19bbe6ab0, event=1)
at /path/to/include/cfl_widget.hpp:77
#7 0x00005cd18cb32d62 in send (o=0x5cd19bbe6ab0, event=1)
at /path/to/fltk/src/Fl_Group.cxx:96
#8 0x00005cd18cb334b7 in Fl_Group::handle (this=0x5cd19bbf0380, event=1)
at /path/to/fltk/src/Fl_Group.cxx:226
#9 0x00005cd18cb6241e in Fl_Window::handle (this=0x5cd19bbf0380, ev=1)
at /path/to/fltk/src/Fl_Window.cxx:606
#10 0x00005cd18cb11de3 in Widget_Derived<Fl_Double_Window>::handle (this=0x5cd19bbf0380, event=1)
at /path/to/include/cfl_widget.hpp:77
#11 0x00005cd18cb1aedc in send_event (event=1, to=0x5cd19bbf0380, window=0x5cd19bbf0380)
at /path/to/fltk/src/Fl.cxx:1274
#12 0x00005cd18cb1b0fd in Fl::handle_ (e=1, window=0x5cd19bbf0380)
at /path/to/fltk/src/Fl.cxx:1415
#13 0x00005cd18cb1af87 in Fl::handle (e=1, window=0x5cd19bbf0380)
at /path/to/fltk/src/Fl.cxx:1364
#14 0x00005cd18cb85466 in fl_handle (thisevent=...)
at /path/to/fltk/src/Fl_x.cxx:2301
#15 0x00005cd18cb7f3c3 in do_queued_events ()
at /path/to/fltk/src/Fl_x.cxx:117
#16 0x00005cd18cb7f79e in fd_callback ()
at /path/to/fltk/src/Fl_x.cxx:311
#17 0x00005cd18cb7ebd1 in Fl_Unix_Screen_Driver::poll_or_select_with_delay (this=0x5cd19bbc12d0, time_to_wait=1e+20)
at /path/to/fltk/src/drivers/Unix/Fl_Unix_Screen_Driver.cxx:79
#18 0x00005cd18cb7f485 in Fl_X11_Screen_Driver::poll_or_select_with_delay (this=0x5cd19bbc12d0, time_to_wait=1e+20)
at /path/to/fltk/src/Fl_x.cxx:138
#19 0x00005cd18cc0f03c in Fl_Unix_System_Driver::wait (this=0x5cd19bba69d0, time_to_wait=1e+20)
at /path/to/fltk/src/drivers/Unix/Fl_Unix_System_Driver.cxx:810
#20 0x00005cd18cb1a18d in Fl::wait (time_to_wait=1e+20)
at /path/to/fltk/src/Fl.cxx:632
#21 0x00005cd18cb1a1ab in Fl::run ()
at /path/to/fltk/src/Fl.cxx:652
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Pack.H>
#include <FL/Fl_Sys_Menu_Bar.H>
#include <FL/Fl_Text_Display.H>
#include <cstdio>
#include <string>
#define APP_VERSION "0.1.0"
int main() {
Fl::scheme("gtk+");
Fl::visual(FL_MULTISAMPLE | FL_ALPHA);
Fl_Double_Window wind(400, 600, (std::string("J1939 Log ") + APP_VERSION).c_str());
Fl_Pack pack(0, 0, wind.w(), wind.h());
pack.type(Fl_Pack::VERTICAL);
Fl_Sys_Menu_Bar menu(0, 0, 100, 35);
menu.add("&Menu/Crash...\t",
0,
[](Fl_Widget*, void*) { fprintf(stderr, "Boom\n"); },
nullptr,
0
);
Fl_Text_Display text(0, 0, 100, 100);
pack.resizable(&text);
pack.end();
wind.end();
wind.resizable(&wind);
wind.show();
return Fl::run();
}