Loading fail with - Array buffer allocation failed
Hello,
We are getting an error stating "Array buffer allocation failed" when loading dicom images with cornerstone and cornerstoneWADOImageLoader. The error occurs only on chrome when running on mobile devices(specifically reproduced on galaxy s10) and not all the time. We are getting the error from cornerstore and after heavy debugging it looks that the source is from the cornerstoneWADOImageLoader and it occurs in: "cornerstoneWADOImageLoader/src/shared/decoders/decodeJPEG2000.js" at the call to "OpenJPEG" From cornerstone we just get "Array buffer allocation failed" and when debuggin I found the following exception:
"RangeError: Array buffer allocation failed
at new ArrayBuffer (<anonymous>)
at OpenJPEG (blob:http://192.168.14.168:8080/0dd29804-7f57-4b08-9292-5fe1ac312c48:3676:22380)
at initializeJPEG2000 (blob:http://192.168.14.168:8080/0dd29804-7f57-4b08-9292-5fe1ac312c48:11073:86)
at decodeJPEG2000 (blob:http://192.168.14.168:8080/0dd29804-7f57-4b08-9292-5fe1ac312c48:11083:3)
at decodeImageFrame (blob:http://192.168.14.168:8080/0dd29804-7f57-4b08-9292-5fe1ac312c48:10831:93)
at Object.handler (blob:http://192.168.14.168:8080/0dd29804-7f57-4b08-9292-5fe1ac312c48:11636:78)
at ./webWorker/webWorker.js.self.onmessage (blob:http://192.168.14.168:8080/0dd29804-7f57-4b08-9292-5fe1ac312c48:11761:39)"
Please note that the dicom's are ok as we are able to load them in many other cases with the exact same code. The issue occurs at the start of the session and we tried to clear cache and it didn't help. Background about the setup: We are setting up cornerstone with cornerstoneWADOImageLoader and cornerstoneWebImageLoader. The cornerstoneWebImageLoader is for showing 'regular' images jpeg/png for a preview untile we load the dicom. In the background, we load all the set's dicoms with 'loadAndCacheImage' and also all the images for the user to be able to scroll fast without waiting for the dicom load to complete. Also, an important note is the when the issue occurs it's from the beginning of the page loading, all dicom load fails and all the png/jepg are working properly.
Would greatly appreciate the help. Thanks.
hello, I meet same problem, do you complete this issue? Thank you beforehand.