Repository navigation
Fix missing mods after repeated Play and crashes after background process death - #54
Merged
MisterGatto merged 1 commit intoOct 31, 2026
Conversation
Return restored game and stale bootstrap activities to the mod manager before accessing process-scoped resources. Guard incomplete lifecycle callbacks and publish the native mod registry only after initialization completes. Report required directory and library failures, resolve mods by path, close map readers, and reuse the existing static scanner. Add regression tests for restoration, loading, and initialization. Validated with 103 Java tests, four native tests, and OnePlus Android 16 process-death and repeated-Play checks.
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.
These fixes came from investigating missing mods and startup crashes during everyday use.
Repeated initialization cleared their registrations while their libraries stayed loaded. Rapidly alternating Global and Huawei on an unpatched build reproduces this.
Android restored GameActivity without its required setup. To reproduce, set Background process limit → At most 1, background the game, switch through other apps, and return without removing Canvas from Recents.
Startup now runs once per process, uninitialized restores return to the mod manager, and incomplete startup is cleaned up safely. Required mod-loading failures also reach the existing error handling.
Validated on OnePlus Android 16 with repeated Play and process-death recovery.