fireStateAtPath crashes on Android
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- kotlin, react-native, typescript
- Domain
- mobile
Research direction
Start by tracing fireStateAtPath through the Android path and inspect the stack-trace locations in Artboard.kt and RiveFileController.kt, especially getOrCreateStateMachines and processAllInputs. Confirm the Android implementation handles the state-machine path without looking up an empty name; done means fireStateAtPath no longer crashes while fireState continues to work.
Written by the indexing model from the issue text.
Description
Description
The app (expo client) crashes when trying to use fireStateAtPath
Provide a Repro
The issue seems to be that it doesn't find the StateMachine in the native side.
Sadly I cannot provide a riv file but it works on both iOS and web - with fireStateAtPath - so the riv file is fine.
fireState also works fine
const fireStateOrfireStateAtPath = (stateName: string) => {
if (stateName.includes("/")) {
const [state, ...path] = stateName.split("/").reverse();
riveRef.current?.fireStateAtPath(state, path.reverse().join("/"));
} else {
riveRef.current?.fireState(stateMachineName, stateName);
}
};
Any ideas? Thank you ❤️
Logcat
08-30 10:37:22.779 32224 1111 F p.myapp.debu: java_vm_ext.cc:578] JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception app.rive.runtime.kotlin.core.errors.StateMachineException: No StateMachine found with name .
08-30 10:37:22.779 32224 1111 F p.myapp.debu: java_vm_ext.cc:578] at app.rive.runtime.kotlin.core.StateMachineInstance app.rive.runtime.kotlin.core.Artboard.stateMachine(java.lang.String) (Artboard.kt:137)
08-30 10:37:22.779 32224 1111 F p.myapp.debu: java_vm_ext.cc:578] at java.util.List app.rive.runtime.kotlin.controllers.RiveFileController.getOrCreateStateMachines(java.lang.String) (RiveFileController.kt:607)
08-30 10:37:22.779 32224 1111 F p.myapp.debu: java_vm_ext.cc:578] at void app.rive.runtime.kotlin.controllers.RiveFileController.processAllInputs() (RiveFileController.kt:523)
08-30 10:37:22.779 32224 1111 F p.myapp.debu: java_vm_ext.cc:578] at void app.rive.runtime.kotlin.controllers.RiveFileController.advance(float) (RiveFileController.kt:264)
08-30 10:37:22.779 32224 1111 F p.myapp.debu: java_vm_ext.cc:578] at void app.rive.runtime.kotlin.renderers.RiveArtboardRenderer.advance(float) (RiveArtboardRenderer.kt:51)
08-30 10:37:22.779 32224 1111 F p.myapp.debu: java_vm_ext.cc:578]
08-30 10:37:22.779 32224 1111 F p.myapp.debu: java_vm_ext.cc:578] in call to CallVoidMethodV
08-30 10:37:22.780 779 855 D EnterpriseController: netId is 0
08-30 10:37:22.780 779 855 E Netd : getNetworkForDns: getNetId from enterpriseCtrl is netid 0
08-30 10:37:22.780 779 855 D DnsProxyListener: DNSDBG::dns addrinfo af 0 - 10252
08-30 10:37:22.813 779 1112 E ResolverController: No valid NAT64 prefix (602, <unspecified>/0)
08-30 10:37:22.974 32224 1111 F p.myapp.debu: thread.cc:2348] No pending exception expected: app.rive.runtime.kotlin.core.errors.StateMachineException: No StateMachine found with name .
08-30 10:37:22.974 32224 1111 F p.myapp.debu: thread.cc:2348] at app.rive.runtime.kotlin.core.StateMachineInstance app.rive.runtime.kotlin.core.Artboard.stateMachine(java.lang.String) (Artboard.kt:137)
08-30 10:37:22.974 32224 1111 F p.myapp.debu: thread.cc:2348] at java.util.List app.rive.runtime.kotlin.controllers.RiveFileController.getOrCreateStateMachines(java.lang.String) (RiveFileController.kt:607)
08-30 10:37:22.974 32224 1111 F p.myapp.debu: thread.cc:2348] at void app.rive.runtime.kotlin.controllers.RiveFileController.processAllInputs() (RiveFileController.kt:523)
08-30 10:37:22.974 32224 1111 F p.myapp.debu: thread.cc:2348] at void app.rive.runtime.kotlin.controllers.RiveFileController.advance(float) (RiveFileController.kt:264)
08-30 10:37:22.974 32224 1111 F p.myapp.debu: thread.cc:2348] at void app.rive.runtime.kotlin.renderers.RiveArtboardRenderer.advance(float) (RiveArtboardRenderer.kt:51)
08-30 10:37:22.974 32224 1111 F p.myapp.debu: thread.cc:2348]
08-30 10:37:22.996 32224 1111 F p.myapp.debu: runtime.cc:642] Runtime aborting --- recursively, so no thread-specific detail!
- Dominant language
- TypeScript
- Stars
- 783
- Forks
- 81
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rive-app/rive-react-native
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
rive-app/rive-react-native#433 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
rive-app/rive-react-native#431 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rive-app/rive-react-native#448 · 2 comments · 1 reaction ·
-
[Android] Rive events dispatched off the UI thread can deadlock with Reanimated under Fabric (ANR)Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rive-app/rive-react-native#444 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
rive-app/rive-react-native#441 ·
All issues in rive-app/rive-react-native
Similar issues
-
bug HemiStake
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
hemilabs/ui-monorepo#2413 ·
Maintainers usually reply within 1 day
-
component/ui framework/react kind/bug language/javascript
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshery/meshery#22216 · 3 comments ·
Maintainers usually reply within 1 day
-
type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
paperclipai/paperclip#14982 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
lingdojo/kana-dojo#31515 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day