MetaMask / MetaMask/metamask-mobile
[Rive][Android] 8.3.0 fatal crash regression — Rive worker-thread JNI abort (METAMASK-MOBILE-5TM4)
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
## Summary
Fatal native Android crash (`SIGSEGV`) on the Rive worker thread, **regressed in 8.3.0**.
- Sentry: [METAMASK-MOBILE-5TM4](https://metamask.sentry.io/issues/METAMASK-MOBILE-5TM4) — ~6.7K users / ~8.1K events.
- Last-24h events are **~100% on `io.metamask@8.3.0+6134`**.
## Crash signature
```
rive_android::WorkerImpl::doFrame
rive_android::JNIExceptionHandler::CallVoidMethod
rive_android::JNIExceptionHandler::check_and_rethrow
art::IndirectReferenceTable::Remove
```
Two triggers land in this same crash group:
1. **Name mismatch** — code fires a Rive state-machine / artboard / input name that doesn't exist in the `.riv`, throwing a `StateMachineInputException` that `rive-react-native`'s native layer never clears before its next JNI call → process abort.
2. **Teardown race** — the Rive view is unmounted / the app is backgrounded mid-frame → stale JNI reference (`IndirectReferenceTable::Remove`).
## Why it regressed in 8.3.0
- Appeared mid-May (7.78–7.80), then tamped down in ~7.81/7.82 by #31042, #31076, #31007, #31547.
- The v06 checklist alignment fix from #31042 was **never forward-ported to `main`** (main kept importing the un-aligned `v05`), and 8.3.0 re-rolled the onboarding assets to brand-new exports — reintroducing the crash.
## Scope
Only Rive surfaces **actually changed in 8.3.0** are tracked here. Sub-issues:
- [ ] Wallet-home onboarding checklist (`onboard_checklist_v07.riv`) — `team-mobile-ux`
- [ ] Money onboarding (`onboarding_flow_v23.riv`) — `team-mobile-ux`
- [ ] Money next-best-action parallax (`next_best_action_module_v1.riv`) — `team-earn`
Not modified in 8.3.0 and therefore excluded for now: Perps tutorial carousel (7.82.0), Rewards points animation (7.57.0), Money first-time deposit (8.0.0), Social Leaderboard onboarding (8.4.0), FoxLoader splash (7.75.0).
## Prior fixes (reference)
- #31042 — wallet home onboarding Rive crash on Android (name-mismatch class)
- #31547 — prevent Android crash in Perps tutorial carousel Rive
- #31076 — stop rive before navigate (teardown race)
- #31007 — gate onboarding stepper animation behind feature flag (kill-switch)
Contributor guide
Research direction
Start with the prior fixes in #31042, #31547, and #31076, then inspect the three listed assets: onboard_checklist_v07.riv, onboarding_flow_v23.riv, and next_best_action_module_v1.riv. Trace their Android Rive worker-thread and teardown paths, and verify that the listed surfaces no longer produce either the name-mismatch or teardown crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100