Repository navigation
[Bug] Crash: IllegalStateException in Compose snapshot system during background state read #2666
Description
Checklist
- I'm reporting a bug unrelated to a specific site.
- I've verified that I'm running the latest version of yt-dlp.
- I've verified that I'm running the latest stable version of Seal or any later preview versions.
- I've read the Contributing guidelines and Code Of Conduct.
- I've checked that the site i'm trying to download from is in the Supported Sites list from yt-dlp
- I understand that the issue will be (ignored/closed) if I intentionally remove or skip any mandatory field.
Describe the bug
应用在运行过程中发生崩溃,异常信息为:
java.lang.IllegalStateException: Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied
To Reproduce
No response
Error reports
App version: 2.0.0-alpha.5 (200000152)
Device information: Android 15 (API 35)
Supported ABIs: [arm64-v8a, armeabi-v7a, armeabi]
Yt-dlp version: 2026.10.10.233141
java.lang.IllegalStateException: Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied
at androidx.compose.runtime.snapshots.SnapshotKt.readError(SourceFile:5)
at androidx.compose.runtime.snapshots.SnapshotKt.current(SourceFile:10)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.readableHash(SourceFile:140)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.isValid(SourceFile:41)
at androidx.compose.runtime.DerivedSnapshotState.currentRecord(SourceFile:7)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.readableHash(SourceFile:127)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.isValid(SourceFile:41)
at androidx.compose.runtime.DerivedSnapshotState.currentRecord(SourceFile:7)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.readableHash(SourceFile:127)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.isValid(SourceFile:41)
at androidx.compose.runtime.DerivedSnapshotState.currentRecord(SourceFile:7)
at androidx.compose.runtime.DerivedSnapshotState.getCurrentRecord(SourceFile:16)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.recordInvalidation(SourceFile:533)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.access$drainChanges(SourceFile:98)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$applyObserver$1.invoke(SourceFile:58)
at androidx.compose.runtime.snapshots.SnapshotKt.advanceGlobalSnapshot(SourceFile:68)
at androidx.compose.runtime.snapshots.SnapshotKt.access$advanceGlobalSnapshot(SourceFile:3)
at androidx.compose.runtime.snapshots.GlobalSnapshot.notifyObjectsInitialized$runtime_release(SourceFile:1)
at androidx.compose.runtime.DerivedSnapshotState.currentRecord(SourceFile:366)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.readableHash(SourceFile:127)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.isValid(SourceFile:41)
at androidx.compose.runtime.DerivedSnapshotState.currentRecord(SourceFile:7)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.readableHash(SourceFile:127)
at androidx.compose.runtime.DerivedSnapshotState$ResultRecord.isValid(SourceFile:41)
at androidx.compose.runtime.DerivedSnapshotState.currentRecord(SourceFile:7)
at androidx.compose.runtime.DerivedSnapshotState.getCurrentRecord(SourceFile:16)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.recordInvalidation(SourceFile:533)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.access$drainChanges(SourceFile:98)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$applyObserver$1.invoke(SourceFile:58)
at androidx.compose.runtime.snapshots.SnapshotKt.advanceGlobalSnapshot(SourceFile:68)
at androidx.compose.runtime.snapshots.SnapshotKt.access$advanceGlobalSnapshot(SourceFile:3)
at androidx.compose.runtime.snapshots.Snapshot$Companion.sendApplyNotifications(SourceFile:31)
at androidx.compose.ui.platform.GlobalSnapshotManager$ensureStarted$1.invokeSuspend(SourceFile:73)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:9)
at kotlinx.coroutines.DispatchedTask.run(SourceFile:113)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(SourceFile:24)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(SourceFile:3)
at android.os.Handler.handleCallback(Handler.java:1014)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:250)
at android.os.Looper.loop(Looper.java:340)
at android.app.ActivityThread.main(ActivityThread.java:9903)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:625)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:957)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.AndroidUiFrameClock@5342c21, DeferredCoroutine{Cancelling}@f2f0846, AndroidUiDispatcher@7b00a07]
Screenshots & Screen Records
No response
Additional context
No response
Activity