Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

fireStateAtPath crashes on Android

未关闭
#264 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
kotlin, react-native, typescript
领域
mobile

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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!
主要语言
TypeScript
星标
785
派生
81
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rive-app/rive-react-native 的其他 Issue

查看 rive-app/rive-react-native 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。