Skip to content

Exception: Bad state #3

Description

@SteepSheep

I sometimes get this error when using this package. Probably related to accessing the cache via different simultaneous calls. I suspect it has to do with the snapshot() function, because here remove() might be called without being awaited (via _onStreamError and/or _onCacheReadError)

[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: Exception: Bad state: This can happen if an inner synchronized block is spawned outside the block it was started from. Make sure the inner synchronized blocks are properly awaited
#0 ReentrantLock.synchronized (package:synchronized/src/reentrant_lock.dart:25:7)
#1 DiskLruCache._cleanUp (package:disk_lru_cache/_src/disk_lru_cache.dart:205:17)
#2 DiskLruCache._recordRemove (package:disk_lru_cache/_src/disk_lru_cache.dart:187:13)

#3 DiskLruCache._removeEntry (package:disk_lru_cache/_src/disk_lru_cache.dart:549:5)

#4 DiskLruCache.remove. (package:disk_lru_cache/_src/disk_lru_cache.dart:432:7)

#5 ReentrantLock.synchronized. (package:synchronized/src/reentrant_lock.dart:38:20)

#6 BasicLock.synchronized (package:synchronized/src/basic_lock.dart:34:18)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions