forked from viewit/OrcaSlicer-KX
libbambu_networking aborts inside its C++ static destructors during the exit() teardown on macOS while its background threads are still alive. Two quit paths reach that exit(): - App menu / Dock / logout: -[NSApplication terminate:] -> exit() bypasses wx OnExit()/~GUI_App. Override OSXOnWillTerminate() (the last wx hook before that exit()) to hard-exit via std::_Exit(0). - Cmd+Q / File>Quit / red button: graceful close -> ~GUI_App(). A guarded std::_Exit(0) at the end of ~GUI_App(), after all cleanup, covers it. macOS-only (#ifdef __APPLE__); Windows/Linux unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>