Kvaesitso icon indicating copy to clipboard operation
Kvaesitso copied to clipboard

Race condition for `Volume external_primary` upon device startup causing crashes

Open shtrophic opened this issue 1 year ago • 0 comments

type: crash
osVersion: google/cheetah/cheetah:14/UQ1A.240105.004/2024012600:user/release-keys
package: de.mm20.launcher2.release:2023101300
process: de.mm20.launcher2.release
processUptime: 820 + 356 ms
installer: dev.imranr.obtainium

java.lang.IllegalArgumentException: Volume external_primary not found
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:172)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
        at android.content.ContentProviderProxy.query(ContentProviderNative.java:495)
        at android.content.ContentResolver.query(ContentResolver.java:1235)
        at android.content.ContentResolver.query(ContentResolver.java:1167)
        at android.content.ContentResolver.query(ContentResolver.java:1123)
        at de.mm20.launcher2.files.LocalFileDeserializer.deserialize(FileSerialization.kt:94)
        at de.mm20.launcher2.searchable.SearchableRepositoryImpl.fromDatabaseEntity(SearchableRepository.kt:209)
        at de.mm20.launcher2.searchable.SearchableRepositoryImpl$get$$inlined$map$1$2.emit(Emitters.kt:76)
        at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:5)
        at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:23)
        at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:1)
        at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:128)
        at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Channels.kt:12)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:112)
        at android.os.Handler.handleCallback(Handler.java:958)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:205)
        at android.os.Looper.loop(Looper.java:294)
        at android.app.ActivityThread.main(ActivityThread.java:8279)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
        at com.android.internal.os.ExecInit.main(ExecInit.java:49)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
        Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@b31dd86, Dispatchers.Main.immediate]

Lately, Kvaesitso has been sporadeously crashing on me when I reboot my device. Since this does not always happen on every reboot, I suspect this to be a race condition.

The exception says that the external_primary Volume is not found; There is probably some delay on mounting that volume during startup?

On GrapheneOS Build UQ1A.240105.004.2024012600.

shtrophic avatar Feb 05 '24 09:02 shtrophic