open-ani / animeko

一站式在线弹幕追番平台:全自动 BT + 在线多数据源聚合,离线缓存,Bangumi 收藏同步,弹幕云过滤 ... 100% Kotlin Compose Multiplatform
https://myani.org
GNU Affero General Public License v3.0
1.91k stars 58 forks source link

放后台一段时间后打开,播放缓存导致无响应 #1195

Open Him188 opened 23 hours ago

Him188 commented 23 hours ago

问题描述

Image

启动app,切换到缓存页,扔到后台,10小时后再打开app。MainActivity 没被杀(瞬间启动)。点击播放就会无响应。

打开 app 之前,没注意 service 通知是否还存在。应该是还在。

HyperOS 2 Android 15

系统设置如图:

Image

日志:

https://t.me/openani_dev/14547

复现步骤

No response

Ani 版本号

4.0.0-beta02

操作系统

Android

应用日志

StageGuard commented 22 hours ago
2024-11-14 02:29:59 ERROR a.AniApplication [null:26] Uncaught exception in thread Thread[main,5,main]
U6.s0: Fatal exception in coroutines machinery for DispatchedContinuation[X@4069a43, Continuation at v.i@ca248c0]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
    at l8.L.f(Unknown Source:21)
    at l8.L.run(Unknown Source:133)
    at R0.X.p0(Unknown Source:23)
    at R0.W.run(Unknown Source:2)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:249)
    at android.os.Looper.loop(Looper.java:337)
    at android.app.ActivityThread.main(ActivityThread.java:9572)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
    Suppressed: q8.e: null
Caused by: java.lang.IllegalStateException: State must be at least CREATED to move to DESTROYED, but was INITIALIZED in component l(0d936f75-a184-440a-a4b9-e16bcf9937e0) destination=h(0x932ae972) route=me.him188.ani.app.navigation.NavRoutes.EpisodeDetail/{subjectId}/{episodeId}
    at androidx.lifecycle.y.d(Unknown Source:58)
    at androidx.lifecycle.y.e(Unknown Source:10)
    at x3.l.c(Unknown Source:42)
    at x3.l.b(Unknown Source:7)
    at x3.D.w(Unknown Source:283)
    at x3.D.b(Unknown Source:49)
    at x3.D.m(Unknown Source:616)
    at x3.D.n(Unknown Source:85)
    at me.him188.ani.app.navigation.AniNavigator$DefaultImpls.navigateEpisodeDetails(Unknown Source:23)
    at me.him188.ani.app.navigation.AniNavigatorImpl.navigateEpisodeDetails(Unknown Source:0)
    at me.him188.ani.app.ui.main.ComposableSingletons$AniAppContentKt$lambda-2$1$1$1$1.navigateEpisodeDetails(Unknown Source:2)
    at me.him188.ani.app.navigation.AniNavigator$DefaultImpls.navigateEpisodeDetails$default(Unknown Source:7)
    at me.him188.ani.app.ui.cache.CacheManagementViewModel.createCacheEpisode$lambda$14(Unknown Source:21)
    at me.him188.ani.app.ui.cache.CacheManagementViewModel.b(Unknown Source:0)
    at Aa.j.invoke(Unknown Source:526)
    at me.him188.ani.app.ui.cache.components.CacheEpisodeState.play(Unknown Source:2)
    at me.him188.ani.app.ui.cache.components.CacheEpisodeItemKt$Dropdown$4.invoke$lambda$5$lambda$4(Unknown Source:0)
    at me.him188.ani.app.ui.cache.components.CacheEpisodeItemKt$Dropdown$4.d(Unknown Source:0)
    at me.him188.ani.app.ui.cache.components.e.invoke(Unknown Source:9)
    at g0.C.a(Unknown Source:14)
    at g0.C.invoke(Unknown Source:65)
    at x.N0.invokeSuspend(Unknown Source:132)
    at B6.a.resumeWith(Unknown Source:8)
    at l8.D.G(Unknown Source:78)
    at l8.k.l(Unknown Source:100)
    at l8.k.w(Unknown Source:32)
    at l8.k.resumeWith(Unknown Source:16)
    at K0.J.P0(Unknown Source:50)
    at K0.J.w(Unknown Source:31)
    at v.j.w(Unknown Source:110)
    at K0.g.h(Unknown Source:156)
    at K0.g.h(Unknown Source:135)
    at K0.g.h(Unknown Source:135)
    at K0.g.h(Unknown Source:135)
    at A2.p.B(Unknown Source:35)
    at C0.a.e(Unknown Source:141)
    at R0.t.G(Unknown Source:80)
    at R0.t.k(Unknown Source:380)
    at R0.t.dispatchTouchEvent(Unknown Source:75)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3158)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2826)
    at android.view.View.dispatchPointerEvent(View.java:16972)
    at com.xiaomi.mirror.MiuiMirrorImpl.isHandled(MiuiMirrorImpl.java:152)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:9000)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8742)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:8094)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:8151)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:8117)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:8283)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:8125)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:8340)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:8098)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:8151)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:8117)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:8125)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:8098)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:11408)
    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:11359)
    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:11320)
    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:11592)
    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:337)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:355)
    at android.os.Looper.loopOnce(Looper.java:203)
    ... 5 common frames omitted
    Suppressed: q8.e: null
StageGuard commented 22 hours ago

修复无响应 https://github.com/open-ani/animeko/compare/3d9b8cb243551acc827380f0ad1df216378dbf76...c63ac8266ac974579d488b4fb0b06cc7ef326f73 我们的 main 分支怎么不能 force push

Him188 commented 14 hours ago

main 肯定不能 force