Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Bad state #3

Open
SteepSheep opened this issue Jun 14, 2021 · 0 comments
Open

Exception: Bad state #3

SteepSheep opened this issue Jun 14, 2021 · 0 comments

Comments

@SteepSheep
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant