Skip to content

fix(amulegui): apply the wxWebSession-cleanup _Exit workaround to the remote GUI - #285

Merged
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:fix/amulegui-websession-exit-crash
Jul 3, 2026
Merged

fix(amulegui): apply the wxWebSession-cleanup _Exit workaround to the remote GUI#285
got3nks merged 1 commit into
amule-org:masterfrom
got3nks:fix/amulegui-websession-exit-crash

Conversation

@got3nks

@got3nks got3nks commented Jul 3, 2026

Copy link
Copy Markdown

Problem

amulegui SIGABRTs on quit inside wxWidgets' own module cleanup (macOS, wx 3.3.2):

main → wxEntry → wxEntryCleanup → wxModule::CleanUpModules
     → WebRequestModule::OnExit() → wxWebSessionURLSession::~()   ← crash

Root cause

Same wxWebSession teardown bug fixed for the monolithic app in #159 (backtrace in #18): wx's WebRequestModule::OnExit destroys the platform wxWebSession, whose dtor dereferences already-freed state and raises SIGABRT. The monolithic amule dodges it with std::_Exit(0) in CamuleGuiApp::OnExit, but the remote GUI uses a separate app class (CamuleRemoteGuiApp) whose OnExit never got the guard. amulegui links wxWebRequest too, so it hits the identical path.

Fix

Apply the same std::_Exit(0) in CamuleRemoteGuiApp::OnExit, after amulegui's own cleanup (tick timer, sockets) has run — mirroring the monolithic fix.

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.
@got3nks
got3nks merged commit 82c0fbc into amule-org:master Jul 3, 2026
11 checks passed
@got3nks
got3nks deleted the fix/amulegui-websession-exit-crash branch July 3, 2026 16:13
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant