android crashlytics 显示崩溃,但不显示我的课程中的位置

问题描述 投票:0回答:1

我正在使用 crashlytics 来监控我的应用程序,我可以看到一些用户遇到了此崩溃:

Fatal Exception: java.util.ConcurrentModificationException:
       at java.util.ArrayList$Itr.next(ArrayList.java:860)
       at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:181)
       at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3$1.invokeSuspend(SafeCollector.common.kt:1)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:1)
       at kotlinx.coroutines.flow.internal.SafeCollector.invokeSuspend(SafeCollector.kt:1)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:1)
       at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:1)
       at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:100)
       at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:100)
       at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:33)
       at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:26)
       at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:26)
       at kotlinx.coroutines.android.HandlerContext$scheduleResumeAfterDelay$$inlined$Runnable$1.run(HandlerContext.java:169)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8757)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

问题是这个日志没有指向我的应用程序代码中的任何位置。 看起来我有一些并发的数组修改,但我不知道它可以在哪里。

如果重要的话,我确实使用 proguard 规则和 minify 启用。我仍然认为崩溃会指向我的包中的某个地方。

我有什么想法可以调查这个吗? 谢谢

android kotlin kotlin-coroutines crashlytics
1个回答
0
投票

我建议在所有地方找到,如果您在项目中使用

.asFlow()
或其他流程构建器,请将所有这些流程'
collect
或其他终端操作符(如
first()
single()
)包装在 try/catch 中并添加定义 log 中的 catch。

© www.soinside.com 2019 - 2024. All rights reserved.