jobobby04 / TachiyomiSY

Free and open source manga reader for Android
Apache License 2.0
2.82k stars 153 forks source link

Crash when open random entry #904

Closed Riztard closed 1 year ago

Riztard commented 1 year ago

Steps to reproduce

  1. open tachiyomi
  2. while library is loading, open random entry

Expected behavior

unable to open random entry/hide the button/show toast

Actual behavior

crash

Crash logs

--------- beginning of main 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: java.lang.IndexOutOfBoundsException: Empty list doesn't contain element at index 0. 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: at kotlin.collections.EmptyList.get(SourceFile:4) 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: at kotlin.collections.EmptyList.get(SourceFile:1) 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: at eu.kanade.tachiyomi.ui.library.LibraryScreenModel$getRandomLibraryItemForCurrentCategory$2.invokeSuspend(SourceFile:28) 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:12) 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: at kotlinx.coroutines.DispatchedTask.run(SourceFile:113) 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(SourceFile:4) 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:3) 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(SourceFile:1) 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:63) 06-14 10:45:57.636 19924 19924 E GlobalExceptionHandler: Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@1db4f5f, androidx.compose.runtime.BroadcastFrameClock@f09edac, StandaloneCoroutine{Cancelling}@cacca75, AndroidUiDispatcher@6c00a0a] 06-14 10:45:57.660 19924 20301 E SQLiteLog: (284) automatic index on C(manga_id) 06-14 10:45:57.660 19924 20301 E SQLiteLog: (284) automatic index on mangas_categories(manga_id) 06-14 10:48:33.757 21710 21752 E SQLiteLog: (5) statement aborts at 2: [PRAGMA journal_mode=TRUNCATE] database is locked 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: java.lang.IndexOutOfBoundsException: Empty list doesn't contain element at index 0. 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: at kotlin.collections.EmptyList.get(SourceFile:4) 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: at kotlin.collections.EmptyList.get(SourceFile:1) 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: at eu.kanade.tachiyomi.ui.library.LibraryScreenModel$getRandomLibraryItemForCurrentCategory$2.invokeSuspend(SourceFile:28) 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:12) 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: at kotlinx.coroutines.DispatchedTask.run(SourceFile:113) 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(SourceFile:4) 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:3) 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(SourceFile:1) 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:63) 06-14 10:48:46.287 21710 21710 E GlobalExceptionHandler: Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@94a2e69, androidx.compose.runtime.BroadcastFrameClock@ceff0ee, StandaloneCoroutine{Cancelling}@3a6498f, AndroidUiDispatcher@bd1141c] 06-14 10:48:46.328 21710 21876 E SQLiteLog: (284) automatic index on C(manga_id) 06-14 10:48:46.328 21710 21876 E SQLiteLog: (284) automatic index on mangas_categories(manga_id) 06-14 10:48:56.258 22013 22028 E DatabaseUtils: Writing exception to parcel 06-14 10:48:56.258 22013 22028 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://eu.kanade.tachiyomi.sy.provider/ext_cache_files/tachiyomi_crash_logs.txt from pid=21990, uid=1000 requires the provider be exported, or grantUriPermission() 06-14 10:48:56.258 22013 22028 E DatabaseUtils: at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:879) 06-14 10:48:56.258 22013 22028 E DatabaseUtils: at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:707) 06-14 10:48:56.258 22013 22028 E DatabaseUtils: at android.content.ContentProvider$Transport.query(ContentProvider.java:246) 06-14 10:48:56.258 22013 22028 E DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:107) 06-14 10:48:56.258 22013 22028 E DatabaseUtils: at android.os.Binder.execTransactInternal(Binder.java:1280) 06-14 10:48:56.258 22013 22028 E DatabaseUtils: at android.os.Binder.execTransact(Binder.java:1244) 06-14 10:48:56.332 22013 22052 E SQLiteLog: (5) statement aborts at 2: [PRAGMA journal_mode=TRUNCATE] database is locked 06-14 10:48:56.772 22013 22028 E DatabaseUtils: Writing exception to parcel 06-14 10:48:56.772 22013 22028 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://eu.kanade.tachiyomi.sy.provider/ext_cache_files/tachiyomi_crash_logs.txt from pid=21990, uid=1000 requires the provider be exported, or grantUriPermission() 06-14 10:48:56.772 22013 22028 E DatabaseUtils: at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:879) 06-14 10:48:56.772 22013 22028 E DatabaseUtils: at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:707) 06-14 10:48:56.772 22013 22028 E DatabaseUtils: at android.content.ContentProvider$Transport.query(ContentProvider.java:246) 06-14 10:48:56.772 22013 22028 E DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:107) 06-14 10:48:56.772 22013 22028 E DatabaseUtils: at android.os.Binder.execTransactInternal(Binder.java:1280) 06-14 10:48:56.772 22013 22028 E DatabaseUtils: at android.os.Binder.execTransact(Binder.java:1244) 06-14 10:48:56.979 22013 22028 E DatabaseUtils: Writing exception to parcel 06-14 10:48:56.979 22013 22028 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://eu.kanade.tachiyomi.sy.provider/ext_cache_files/tachiyomi_crash_logs.txt from pid=21990, uid=1000 requires the provider be exported, or grantUriPermission() 06-14 10:48:56.979 22013 22028 E DatabaseUtils: at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:879) 06-14 10:48:56.979 22013 22028 E DatabaseUtils: at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:707) 06-14 10:48:56.979 22013 22028 E DatabaseUtils: at android.content.ContentProvider$Transport.query(ContentProvider.java:246) 06-14 10:48:56.979 22013 22028 E DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:107) 06-14 10:48:56.979 22013 22028 E DatabaseUtils: at android.os.Binder.execTransactInternal(Binder.java:1280) 06-14 10:48:56.979 22013 22028 E DatabaseUtils: at android.os.Binder.execTransact(Binder.java:1244) 06-14 10:49:02.938 22222 22263 E SQLiteLog: (5) statement aborts at 2: [PRAGMA journal_mode=TRUNCATE] database is locked 06-14 10:49:15.442 22222 22355 E SQLiteLog: (284) automatic index on C(manga_id) 06-14 10:49:15.442 22222 22355 E SQLiteLog: (284) automatic index on mangas_categories(manga_id) 06-14 10:49:21.126 22222 22355 E SQLiteLog: (284) automatic index on C(manga_id) 06-14 10:49:21.126 22222 22355 E SQLiteLog: (284) automatic index on mangas_categories(manga_id) 06-14 10:49:21.126 22222 22355 E SQLiteLog: (284) automatic index on merged(manga_id) 06-14 10:49:21.126 22222 22355 E SQLiteLog: (284) automatic index on ME(merge_id) 06-14 10:49:21.126 22222 22355 E SQLiteLog: (284) automatic index on C(merge_id) 06-14 10:49:21.126 22222 22355 E SQLiteLog: (284) automatic index on mangas_categories(manga_id) 06-14 10:50:50.856 23030 23160 E SQLiteLog: (284) automatic index on C(manga_id) 06-14 10:50:50.856 23030 23160 E SQLiteLog: (284) automatic index on mangas_categories(manga_id) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: java.lang.IndexOutOfBoundsException: Empty list doesn't contain element at index 0. 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: at kotlin.collections.EmptyList.get(SourceFile:4) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: at kotlin.collections.EmptyList.get(SourceFile:1) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: at eu.kanade.tachiyomi.ui.library.LibraryScreenModel$getRandomLibraryItemForCurrentCategory$2.invokeSuspend(SourceFile:28) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:12) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: at kotlinx.coroutines.DispatchedTask.run(SourceFile:113) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(SourceFile:4) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:3) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(SourceFile:1) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:63) 06-14 10:50:53.143 23030 23030 E GlobalExceptionHandler: Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@9620d33, androidx.compose.runtime.BroadcastFrameClock@73758f0, StandaloneCoroutine{Cancelling}@94a2e69, AndroidUiDispatcher@ceff0ee] 06-14 10:50:54.444 23295 23349 E SQLiteLog: (5) statement aborts at 2: [PRAGMA journal_mode=TRUNCATE] database is locked App version: 1.9.3 (standard, ee47d74b5, 54, 2023-05-21T01:58Z) Preview build: 522 Android version: 13 (SDK 33) Android build ID: evolution_mi439-userdebug 13 TQ2B.230505.005.A1 1685177232 release-keys Device brand: Xiaomi Device manufacturer: Xiaomi Device name: olive Device model: Redmi 8 Device product name: evolution_mi439

Tachiyomi version

r522

Android version

A13

Device

Redmi 8

Other details

not sure if it happens to the main tachi, since it load quite fast

Acknowledgements

Riztard commented 1 year ago

nvm it happen to main tachi