Skip to content

Fix missing mods after repeated Play and crashes after background process death - #54

Merged
MisterGatto merged 1 commit into
skyprotocol:osp-masterfrom
HugeFrog24:fix/canvas-process-restoration
Oct 31, 2026
Merged

MisterGatto merged 1 commit into
skyprotocol:osp-masterfrom
HugeFrog24:fix/canvas-process-restoration

Conversation

@HugeFrog24

Copy link
Copy Markdown
Contributor

These fixes came from investigating missing mods and startup crashes during everyday use.

  • Enabled mods could disappear from the Canvas Menu.
    Repeated initialization cleared their registrations while their libraries stayed loaded. Rapidly alternating Global and Huawei on an unpatched build reproduces this.
  • Returning to Canvas after a background kill could skip setup and crash.
    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.

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.
@MisterGatto
MisterGatto merged commit eb5c67a into skyprotocol:osp-master Oct 31, 2026
1 check failed
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.

2 participants