cornerstone.imageCache.purgeCache() caused error
See original GitHub issueHello cornerstone.imageCache.purgeCache() caused this error.
Uncaught TypeError: imagePromise.reject is not a function
at Object.<anonymous> (cornerstone.js:699)
at Object.<anonymous> (jquery.min.js:2)
at i (jquery.min.js:2)
at Object.add [as done] (jquery.min.js:2)
at Array.<anonymous> (jquery.min.js:2)
at Function.each (jquery.min.js:2)
at Object.<anonymous> (jquery.min.js:2)
at Function.Deferred (jquery.min.js:2)
at Object.then (jquery.min.js:2)
at decache (cornerstone.js:695)
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Image Cache - cornerstone
Cornerstone stores Images inside the Image Cache to keep track of memory usage. ... Manually purge the cache of all images (purgeCache); Retrieve...
Read more >Topic: Purge Cornerstone Cache? | Themeco Community
Is there a way to purge the cornerstone cache? I have purged browser cache ... This can cause stale data to be loaded....
Read more >Removing image data from cornerstone - Google Groups
Is there a designated way to remove previously loaded image data to unburden the memory as well as to keep data consistent for...
Read more >Incident Response - Hybrid Analysis
... numberOfImagesCached: cachedImages.length }; } function purgeCache() ... Doing `name + ''` can cause a repl error if the result to `toString` is...
Read more >cornerstone - Bountysource
"cornerstone-wado-image-loader": "^3.1.2",. Issue. when using loadAndCacheImage it throw an error as "Not a JPEG file" and task "task decodeTask failed ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have been thinking about this. Taking a step back, the image loader issues a promise, and then the cache waits for the promise to be fulfilled (or fail). Rejecting the promise would be something that the image loader would do to tell the cache that the operation failed. So, in other words, it is a message from the image loader to the cache.
Here we are trying to do a communication in the other direction, this is, the cache telling the image loader that some image is not required anymore. Therefore rejecting the promise is not the right mechanism.
For the moment I have thought of two ways to achieve this communication from cache to image loader.
After receiving the message, the imageLoader would cancel the underlying request an do the required clean up; and then reject the promise. So, only the entity that issued the promise should reject it.
Hi @leonardorame,
I actually thought I had changed that already. Sorry about that.
I’ve just released version cornerstoneWebImageLoader 0.8.2 with the fix applied: https://github.com/chafey/cornerstoneWebImageLoader/commit/94e5649fb18103a1ccb882a07800672df0df9db2