Fix: Prevent crash during Mudlet shutdown when closing profiles#8606
Merged
vadi2 merged 1 commit intoMudlet:developmentfrom Dec 5, 2025
Merged
Fix: Prevent crash during Mudlet shutdown when closing profiles#8606vadi2 merged 1 commit intoMudlet:developmentfrom
vadi2 merged 1 commit intoMudlet:developmentfrom
Conversation
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
vadi2
approved these changes
Dec 2, 2025
vadi2
pushed a commit
that referenced
this pull request
Dec 6, 2025
#### Brief overview of PR changes/additions Added safety checks to prevent accessing command line tracking during Host shutdown. The fix adds `mIsClosingDown` checks to three Host methods that manage the command line focus stack. #### Motivation for adding to Mudlet Mudlet was crashing with a segmentation fault when shutting down, especially when closing multiple profiles. The crash occurred because focus events were still trying to update command line tracking while the Host object was being destroyed, leading to access of invalid memory. #### Other info (issues closed, discussion etc) - Fixes #7478 - Crash was happening in `Host::recordActiveCommandLine()` during shutdown - Added protection to `recordActiveCommandLine()`, `forgetCommandLine()`, and `activeCommandLine()` methods - Tested successfully - Mudlet now shuts down cleanly without crashes (cherry picked from commit adba266)
Member
|
Cherry-picked into release-4.20 branch. |
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.
Brief overview of PR changes/additions
Added safety checks to prevent accessing command line tracking during Host shutdown. The fix adds
mIsClosingDownchecks to three Host methods that manage the command line focus stack.Motivation for adding to Mudlet
Mudlet was crashing with a segmentation fault when shutting down, especially when closing multiple profiles. The crash occurred because focus events were still trying to update command line tracking while the Host object was being destroyed, leading to access of invalid memory.
Other info (issues closed, discussion etc)
Host::recordActiveCommandLine()during shutdownrecordActiveCommandLine(),forgetCommandLine(), andactiveCommandLine()methods