fix(amulegui): apply the wxWebSession-cleanup _Exit workaround to the remote GUI - #285
Merged
got3nks merged 1 commit intoJul 3, 2026
Conversation
The monolithic app already bypasses wx's static-destructor / module cleanup in CamuleGuiApp::OnExit to avoid a crash in the platform wxWebSession destructor at quit (amule-org#18, PR amule-project#159). The remote GUI uses a separate app class (CamuleRemoteGuiApp) whose OnExit never got the same guard, so amulegui still SIGABRTs on quit in WebRequestModule::OnExit -> wxWebSessionURLSession::~ on macOS (wx 3.3.2). It links wxWebRequest too, so it hits the identical path. Apply the same std::_Exit(0) after amulegui's own cleanup (timer, sockets) has run.
Cflsft
pushed a commit
to Cflsft/amule
that referenced
this pull request
Jul 6, 2026
…amule-org#285) The monolithic app already bypasses wx's static-destructor / module cleanup in CamuleGuiApp::OnExit to avoid a crash in the platform wxWebSession destructor at quit (amule-org#18, PR amule-org#159). The remote GUI uses a separate app class (CamuleRemoteGuiApp) whose OnExit never got the same guard, so amulegui still SIGABRTs on quit in WebRequestModule::OnExit -> wxWebSessionURLSession::~ on macOS (wx 3.3.2). It links wxWebRequest too, so it hits the identical path. Apply the same std::_Exit(0) after amulegui's own cleanup (timer, sockets) has run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
amulegui SIGABRTs on quit inside wxWidgets' own module cleanup (macOS, wx 3.3.2):
Root cause
Same wxWebSession teardown bug fixed for the monolithic app in #159 (backtrace in #18): wx's
WebRequestModule::OnExitdestroys the platformwxWebSession, whose dtor dereferences already-freed state and raises SIGABRT. The monolithicamuledodges it withstd::_Exit(0)inCamuleGuiApp::OnExit, but the remote GUI uses a separate app class (CamuleRemoteGuiApp) whoseOnExitnever got the guard. amulegui linkswxWebRequesttoo, so it hits the identical path.Fix
Apply the same
std::_Exit(0)inCamuleRemoteGuiApp::OnExit, after amulegui's own cleanup (tick timer, sockets) has run — mirroring the monolithic fix.