Crash of experiemental Android version due to Rust embedding#46
Open
kasnder wants to merge 1 commit into
Open
Conversation
Document a low-severity, non-deterministic Android startup crash: tao 0.34.5's ndk_context::android_context() can be accessed before create() initializes it on an abrupt cold start, aborting the UI process (SIGABRT). Root cause is purely upstream tao (our Rust never touches ndk_context); enforcement is Kotlin so blocking is unaffected and the crash self-recovers on relaunch. Proposed fix: bump Tauri toward 2.11.x, which brings tao 0.35 / wry 0.55 where the panic is replaced by main_android_context() -> Option<..> with graceful handling. Not applied here because the minor Tauri bump needs a full cross-platform regression pass; this note tracks it with a verification plan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Files a tracking/RFC note for a low-severity, non-deterministic Android startup crash and proposes the fix. Doc:
docs/android-ndk-context-startup-panic.md. No code change — this PR is the write-up so the fix can be scheduled deliberately.The issue
On an abrupt/stressed cold start the Android app aborts during startup:
Root cause is upstream
tao 0.34.5, not our code:create()(fromMainActivity.onCreate) callsndk_context::initialize_android_context(), and an unguardedandroid_context()access during early lifecycle (a JNI callback / event-loop thread) can run before it → panic that can't unwind → abort. Our Rust (src-tauri/,tauri-plugin-android-blocker/) never referencesndk_context.Why it's low severity
BlockerService+ WorkManager, independent of the Tauri UI process.Proposed fix
Bump Tauri 2.9.5 → 2.11.x (→
wry 0.55→tao 0.35).tao 0.35replaces the panickingandroid_context()withmain_android_context() -> Option<..>and gracefullet Some(..) elsehandling, plus a synchronized activity-creation handshake — removing this panic class. No first-party code change is needed for the crash itself.Not applied in this PR because a minor Tauri bump is cross-cutting (desktop signing/notarization, iOS, Android, all enforcement/display paths) and must not ship untested. The doc includes a verification plan. Happy to take the actual bump + regression pass as a follow-up PR.
Note: the Android app currently lives on
codex/android-tauri-blocker-clean; this note is filed againstmainso the version facts (tao 0.34.5also underlies desktopwry) and the scheduling are visible there.🤖 Generated with Claude Code