Im new to wxwidgets, just learning for about a week, I have a problem with a crash on quitting the to ide MSVS2019. I narrowed it down to the dynamic event handler that I put on a listcontrol to catch selections, but its happened a few times with other events so Ive reverted to static tables, but I need to know how to fit this for the future
Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(cMainWindow::OnListControl), this);
The code works and I can handle the event to achieve my goal, but it always crashes when I quit with
Unhandled exception at 0x00007FF6811035D0 in MR_wxWidgets1.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000F52EC03FE0).
If I handle this event with a static table calling the same method I do not get the crash when I quit.
I've no idea why this is happening. I tried moving the connect command to the main app, but it still crashed, and Ive tried various disconnects in the destructors, but that doesnt work.
What am I missing here?
User contributions licensed under CC BY-SA 3.0