Ehviewer-Overhauled / Ehviewer

EhViewer overhauled with Material Design 3, Jetpack Compose and more
GNU General Public License v3.0
5.22k stars 235 forks source link

闪退问题 #865

Closed Sayaori closed 1 year ago

Sayaori commented 1 year ago

复现步骤 / Step to reproduce

https://user-images.githubusercontent.com/73752368/220549905-1d470701-4349-4f89-9b38-5b17f726077d.mp4

预期行为 / Expected behaviour

不崩溃

实际行为 / Actual Behaviour

崩溃

备注 / Addition details

log-2023-02-22-15-13-37-187.zip

EhViewer 版本号 / EhViewer version code

1.8.6.2

EhViewer CI 版本 / EhViewer CI Version

https://github.com/Ehviewer-Overhauled/Ehviewer/actions/runs/4222745660

Android 系统版本 / Android version

安卓13,colorOS13

设备型号 / Device model

oneplus 9 pro

SoC 型号 / Soc model

骁龙888

自查步骤 / Verify steps

asuka-mio commented 1 year ago

java.lang.RuntimeException: Unable to start activity ComponentInfo{moe.tarsin.ehviewer/eu.kanade.tachiyomi.ui.reader.ReaderActivity}: java.lang.IllegalStateException: Check failed. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3869) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4011) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:111) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2466) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:240) at android.os.Looper.loop(Looper.java:351) at android.app.ActivityThread.main(ActivityThread.java:8364) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013) Caused by: java.lang.IllegalStateException: Check failed. at coil.decode.BitmapFactoryDecoder$decode$2$1.eu.kanade.tachiyomi.ui.reader.loader.PageLoader$mPages$2.invoke(Unknown Source:119) eu.kanade.tachiyomi.ui.reader.loader.PageLoader$mPages$2.invoke$bridge at coil.decode.BitmapFactoryDecoder$decode$2$1.eu.kanade.tachiyomi.ui.reader.loader.PageLoader$mPages$2.invoke(Unknown Source:158) invoke$bridge at kotlin.SynchronizedLazyImpl.getValue(Unknown Source:20) at eu.kanade.tachiyomi.ui.reader.loader.PageLoader.getMPages(Unknown Source:2) at eu.kanade.tachiyomi.ui.reader.viewer.pager.PagerViewer.eu.kanade.tachiyomi.ui.reader.viewer.pager.PagerViewerAdapter.setChapters(Unknown Source:5) setChaptersInternal at eu.kanade.tachiyomi.ui.reader.viewer.pager.PagerViewer.setGalleryProvider(Unknown Source:4) at eu.kanade.tachiyomi.ui.reader.ReaderActivity.setGallery(Unknown Source:341) at androidx.navigation.compose.NavHostControllerKt$NavControllerSaver$2.eu.kanade.tachiyomi.ui.reader.setting.ReaderColorFilterSettings$1.invoke(Unknown Source:111) eu.kanade.tachiyomi.ui.reader.setting.ReaderColorFilterSettings$1.invoke invoke$bridge at kotlinx.coroutines.DebugStringsKt.eu.kanade.tachiyomi.util.preference.PreferenceExtensionsKt.asHotFlow(Unknown Source:4) at eu.kanade.tachiyomi.ui.reader.setting.ReaderColorFilterSettings.(Unknown Source:378) at eu.kanade.tachiyomi.ui.reader.setting.ReaderSettingsSheet.eu.kanade.tachiyomi.ui.reader.setting.ReaderColorFilterSettings.(Unknown Source:29) eu.kanade.tachiyomi.ui.reader.setting.ReaderSettingsSheet.initSettings

at eu.kanade.tachiyomi.ui.reader.ReaderActivity.eu.kanade.tachiyomi.ui.reader.setting.ReaderSettingsSheet.(Unknown Source:769) initBottomShortcuts initializeMenu onCreate at android.app.Activity.performCreate(Activity.java:8397) at android.app.Activity.performCreate(Activity.java:8370) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1403) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3842) ... 12 more java.lang.IllegalStateException: Check failed. at coil.decode.BitmapFactoryDecoder$decode$2$1.eu.kanade.tachiyomi.ui.reader.loader.PageLoader$mPages$2.invoke(Unknown Source:119) eu.kanade.tachiyomi.ui.reader.loader.PageLoader$mPages$2.invoke$bridge at coil.decode.BitmapFactoryDecoder$decode$2$1.eu.kanade.tachiyomi.ui.reader.loader.PageLoader$mPages$2.invoke(Unknown Source:158) invoke$bridge at kotlin.SynchronizedLazyImpl.getValue(Unknown Source:20) at eu.kanade.tachiyomi.ui.reader.loader.PageLoader.getMPages(Unknown Source:2) at eu.kanade.tachiyomi.ui.reader.viewer.pager.PagerViewer.eu.kanade.tachiyomi.ui.reader.viewer.pager.PagerViewerAdapter.setChapters(Unknown Source:5) setChaptersInternal at eu.kanade.tachiyomi.ui.reader.viewer.pager.PagerViewer.setGalleryProvider(Unknown Source:4) at eu.kanade.tachiyomi.ui.reader.ReaderActivity.setGallery(Unknown Source:341) at androidx.navigation.compose.NavHostControllerKt$NavControllerSaver$2.eu.kanade.tachiyomi.ui.reader.setting.ReaderColorFilterSettings$1.invoke(Unknown Source:111) eu.kanade.tachiyomi.ui.reader.setting.ReaderColorFilterSettings$1.invoke invoke$bridge at kotlinx.coroutines.DebugStringsKt.eu.kanade.tachiyomi.util.preference.PreferenceExtensionsKt.asHotFlow(Unknown Source:4) at eu.kanade.tachiyomi.ui.reader.setting.ReaderColorFilterSettings.(Unknown Source:378) at eu.kanade.tachiyomi.ui.reader.setting.ReaderSettingsSheet.eu.kanade.tachiyomi.ui.reader.setting.ReaderColorFilterSettings.(Unknown Source:29) eu.kanade.tachiyomi.ui.reader.setting.ReaderSettingsSheet.initSettings at eu.kanade.tachiyomi.ui.reader.ReaderActivity.eu.kanade.tachiyomi.ui.reader.setting.ReaderSettingsSheet.(Unknown Source:769) initBottomShortcuts initializeMenu onCreate at android.app.Activity.performCreate(Activity.java:8397) at android.app.Activity.performCreate(Activity.java:8370) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1403) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3842) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4011) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:111) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2466) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:240) at android.os.Looper.loop(Looper.java:351) at android.app.ActivityThread.main(ActivityThread.java:8364) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013) 你这是1.8.6.2的release? retrace后明显不对啊
Sayaori commented 1 year ago

是1.8.6.2的

Sayaori commented 1 year ago

Screenshot_2023-02-22-15-52-24-12_f2f1746601bf3b868d00d5efaf12e601

FooIbar commented 1 year ago

https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1dc36275aaacef2c845db70c8a512fb1a20db7e3/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderColorFilterSettings.kt#L43-L53 话说这里有必要调用setGallery吗,refreshAdapter就够了吧

asuka-mio commented 1 year ago

https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1dc36275aaacef2c845db70c8a512fb1a20db7e3/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderColorFilterSettings.kt#L43-L53

话说这里有必要调用setGallery吗,refreshAdapter就够了吧

解码出来的图片色彩空间不一样 原先的图片和更新后的屏幕不在一个色彩空间

asuka-mio commented 1 year ago

https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1dc36275aaacef2c845db70c8a512fb1a20db7e3/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderColorFilterSettings.kt#L43-L53

话说这里有必要调用setGallery吗,refreshAdapter就够了吧

啊 看差了, setGallery确实不用

asuka-mio commented 1 year ago

https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1dc36275aaacef2c845db70c8a512fb1a20db7e3/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderColorFilterSettings.kt#L43-L53

话说这里有必要调用setGallery吗,refreshAdapter就够了吧

不太行 FATAL EXCEPTION: main Process: moe.tarsin.ehviewer, PID: 5602 java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@b9307f5 at android.graphics.BaseCanvas.throwIfCannotDraw(BaseCanvas.java:74) at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:263) at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:94) at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:549) at android.widget.ImageView.onDraw(ImageView.java:1446) at android.view.View.draw(View.java:23201) at android.view.View.updateDisplayListIfDirty(View.java:22068) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22059) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at androidx.recyclerview.widget.RecyclerView.drawChild(Unknown Source:0) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.draw(View.java:23204) at androidx.recyclerview.widget.RecyclerView.draw(Unknown Source:0) at android.view.View.updateDisplayListIfDirty(View.java:22068) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22059) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22059) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.draw(View.java:23204) at android.view.View.updateDisplayListIfDirty(View.java:22068) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(Unknown Source:13) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22059) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22059) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22059) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22059) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.updateDisplayListIfDirty(View.java:22059) at android.view.View.draw(View.java:22932) at android.view.ViewGroup.drawChild(ViewGroup.java:4529) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4290) at android.view.View.draw(View.java:23204) at com.android.internal.policy.DecorView.draw(DecorView.java:821) at android.view.View.updateDisplayListIfDirty(View.java:22068) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:689) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:695) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:793) at android.view.ViewRootImpl.draw(ViewRootImpl.java:4670) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4381) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3600)

asuka-mio commented 1 year ago

没法保证在渲染的同时位图不被回收

FooIbar commented 1 year ago

没法保证在渲染的同时位图不被回收

restart那里把页面状态先改成QUEUE