Crash: IllegalStateException in AppContext.getLiveValue
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- mobile-dev
调研方向
Start with ai.opencode.core.dependencies.AppContext.getLiveValue in AppContext.java, then follow the dependency initialization through DependencyValues.kt, AppFeatureMigrations.kt, and MainActivity.kt as shown in the stack trace. Reproduce the startup path and identify why the live dependency value throws IllegalStateException. The change is done when the affected startup path no longer crashes and the relevant dependency lifecycle behavior is covered by a test.
由索引模型根据 Issue 内容生成。
描述
Google Play reported this crash (Android vitals).
- Exception:
java.lang.IllegalStateException - Where:
ai.opencode.core.dependencies.AppContext.getLiveValue - Last 7 days: 2 reports from about 2 users
- Version codes: 380–1015
- Android API levels: 34–36
- Last seen: 2026-11-27
- Sample: Samsung Galaxy A72, Android API 34, version code 380, commit 82079247e
Exception java.lang.RuntimeException
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4164)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4322)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:139)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:96)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2685)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:230)
at android.os.Looper.loop (Looper.java:319)
at android.app.ActivityThread.main (ActivityThread.java:8919)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)
at ai.opencode.core.dependencies.AppContext.getLiveValue (AppContext.java:20)
at ai.opencode.core.dependencies.AppContext.getLiveValue (AppContext.java:18)
at ai.opencode.core.dependencies.DependencyValues$Companion.live (DependencyValues.java:65)
at ai.opencode.core.dependencies.DependencyValues$Companion.access$live (DependencyValues.java:60)
at ai.opencode.core.dependencies.DependencyValues.get (DependencyValues.kt:35)
at ai.opencode.core.dependencies.DependencyValuesKt.dependency (DependencyValues.kt:135)
at ai.opencode.core.sharing.LiveSharedBytes$Companion.create (LiveSharedBytes.java:185)
at ai.opencode.core.sharing.SharedStore.liveValue_delegate$lambda$0 (SharedStore.java:150)
at kotlin.SynchronizedLazyImpl.getValue (LazyJVM.kt:86)
at ai.opencode.core.sharing.SharedStore$Key.getLiveValue (SharedStore.java:150)
at ai.opencode.core.sharing.SharedStore$Key.getLiveValue (SharedStore.java:149)
at ai.opencode.core.dependencies.DependencyValues$Companion.live (DependencyValues.java:65)
at ai.opencode.core.dependencies.DependencyValues$Companion.access$live (DependencyValues.java:60)
at ai.opencode.core.dependencies.DependencyValues.get (DependencyValues.kt:35)
at ai.opencode.core.dependencies.DependencyValuesKt.dependency (DependencyValues.kt:135)
at ai.opencode.app.AppFeatureMigrationsKt.migrateBeforeRestore (AppFeatureMigrations.kt:58)
at ai.opencode.app.AppFeature$State$Companion.initial (AppFeature.java:278)
at ai.opencode.app.RootStore.resolve$lambda$0 (RootStore.java:245)
at ai.opencode.app.RootStore.resolve (RootStore.java:261)
at ai.opencode.app.RootStore.resolve (RootStore.java:244)
at ai.opencode.app.MainActivity.onCreate (MainActivity.kt:100)
at android.app.Activity.performCreate (Activity.java:8975)
at android.app.Activity.performCreate (Activity.java:8944)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1456)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4146)
Play Console (needs access):
- 主要语言
- Kotlin
- 星标
- 146
- 派生
- 35
- 平均合并
- 7 小时 41 分钟
- 30 天内合并 PR
- 221
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode-android 的其他 Issue
-
F-droid release未关闭
难度 3/5 1-2 天 新手友好度 55/100
anomalyco/opencode-android#345 ·
维护者通常 1 天内回复
-
crash crash-needs-human crash-triaged
难度 3/5 1-2 天 新手友好度 58/100
anomalyco/opencode-android#341 · 1 条评论 ·
维护者通常 1 天内回复
-
crash crash-needs-human crash-triaged
难度 3/5 1-2 天 新手友好度 45/100
anomalyco/opencode-android#340 · 1 条评论 ·
维护者通常 1 天内回复
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponse可能已有人在做 @Tarquinen 于 3 天前认领。 未关闭crash crash-triaged
难度 2/5 1-3 小时 新手友好度 35/100
anomalyco/opencode-android#320 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 50/100
anomalyco/opencode-android#317 ·
维护者通常 1 天内回复
查看 anomalyco/opencode-android 的全部 Issue
相似的 Issue
-
feature request needs decision
难度 2/5 1-3 小时 新手友好度 83/100
tswistak/Battery-Monitor#207 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
-
F-Droid FOSS question
难度 1/5 1 小时以内 新手友好度 75/100
d4rken-org/butler#365 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
panel-assistant/android#224 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复