AndBible / and-bible

AndBible: Bible Study
https://andbible.org
GNU General Public License v3.0
550 stars 193 forks source link

Crash: NoSuchElementException: List is empty. (WindowRepository.kt) #3091

Open tuomas2 opened 7 months ago

tuomas2 commented 7 months ago

Opened app, did a couple of searches and so on, tried to swap workspaces from the current to another which had somehow been saved (I did know know what workspaces were so I just tried clicking on another)

At this point the app crashed.

https://support.andbible.org/scp/tickets.php?id=2290

Device info:
Version: 5.0.771#5578074e8 fdroid standard release (built 25/11/23 18:54:54)
Android version: 13
Android SDK version: 33
Manufacturer: motorola
Model: moto g(7) power
Storage Mb free: 39756
WebView version: 117.0.5938.140
SQLITE version: 3.42.0
Used heap memory in Mb: 9
Max heap memory in Mb: 192

Exception:
java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:214)
at kotlin.collections.CollectionsKt.first(Unknown Source:0)
at [net.bible.android.control.page](https://net.bible.android.control.page/).window.WindowRepository.getFirstVisibleWindow(WindowRepository.kt:153)
at [net.bible.android.view.activity.page](https://net.bible.android.view.activity.page/).BibleView.isTopWindow(BibleView.kt:1617)
at [net.bible.android.view.activity.page](https://net.bible.android.view.activity.page/).BibleView.getTopOffset(BibleView.kt:1624)
at [net.bible.android.view.activity.page](https://net.bible.android.view.activity.page/).BibleView.loadDocument(BibleView.kt:1201)
at [net.bible.android.control.page](https://net.bible.android.control.page/).window.Window$loadText$1.invokeSuspend(Window.kt:233)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at [kotlinx](https://kotlinx.coroutines.dispatchedtask.run/)[.coroutines.](https://kotlinx.coroutines.dispatchedtask.run/)[DispatchedTask](https://kotlinx.coroutines.dispatchedtask.run/)[.run](https://kotlinx.coroutines.dispatchedtask.run/)(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$[Worker](https://worker.run/)[.run](https://worker.run/)(LimitedDispatcher.kt:115)
at [kotlinx](https://kotlinx.coroutines.scheduling.taskimpl.run/)[.coroutines.scheduling.](https://kotlinx.coroutines.scheduling.taskimpl.run/)[TaskImpl](https://kotlinx.coroutines.scheduling.taskimpl.run/)[.run](https://kotlinx.coroutines.scheduling.taskimpl.run/)(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$[Worker](https://worker.run/)[.run](https://worker.run/)(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@84e2c38, Dispatchers.IO]
tuomas2 commented 6 months ago

one-time issue and not reproducing. Could try a little to figure out the problem (but not spend a lot of time on this)

tuomas2 commented 4 months ago

Happened again: https://support.andbible.org/scp/tickets.php?id=2448