WebAssembly.Memory(): could not allocate memory
See original GitHub issueI have two graphic cards on my workstation, the one plugged with the monitor is Intel HD 530. While trying the examples Chrome crashes and FF is really slow and complains that page is slowing the browser.
Chrome version: 100.0.4896.60
CornerstoneRender: Using detect-gpu to get the GPU benchmark: {device: undefined, fps: 55, gpu: 'intel mesa intel hd graphics 530', isMobile: false, tier: 2, …}
device: undefined
fps: 55
gpu: "intel mesa intel hd graphics 530"
isMobile: false
tier: 2
type: "BENCHMARK"
[[Prototype]]: Object
12:52:54.544 init.ts:55 CornerstoneRender: using GPU rendering
12:52:54.545 dicomweb-client.es.js:1086 retrieve metadata of series 1.3.6.1.4.1.14519.5.2.1.7009.2403.226151125820845824875394858561
12:52:54.823 dicomweb-client.es.js:1086 retrieve metadata of series 1.3.6.1.4.1.14519.5.2.1.7009.2403.879445243400782656317561081015
12:52:57.905 RenderingEngine.ts:103 [Violation] 'requestAnimationFrame' handler took 1818ms
12:52:59.093 index.worker.min.worker.js:1 Uncaught RangeError: WebAssembly.Memory(): could not allocate memory
at o (index.worker.min.worker.js:1:81364)
at I (index.worker.min.worker.js:1:154829)
at ke (index.worker.min.worker.js:1:168400)
at Object.initialize (index.worker.min.worker.js:1:169326)
at index.worker.min.worker.js:1:153529
at Array.forEach (<anonymous>)
at index.worker.min.worker.js:1:153503
at self.onmessage (index.worker.min.worker.js:1:153665)
is it supposed to fallback to CPU?
Issue Analytics
- State:
- Created a year ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Uncaught RangeError: WebAssembly.Memory(): could not ...
Memory (): could not allocate memory. When I go to "inspect > memory > Select Javascript VM instance", memory grows each time I...
Read more >could not allocate memory" when running ffmpeg.wasm on ...
You're likely getting this error because there is literally not enough memory on the device. It's a common issue with Wasm applications (or ......
Read more >RangeError: WebAssembly.Memory(): could not allocate ...
Memory(): could not allocate memory. I updated the three. module. js to the new release 142 and I am getting an error “RangeError:...
Read more >Chasing Memory Bugs through V8 and WebAssembly
Uncaught RangeError : WebAssembly.Memory(): could not allocate memory. This is clearly not about memory usage per se! A Memory({ initial: 1 }) ...
Read more >Regrading a issue on loading wasm
Uncaught RangeError : WebAssembly.Memory(): could not allocate memory. Screenshot added below,. Thanks in advance.. Screenshot 2019-04-02 at 4.47.45 PM.
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 Free
Top 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
I have the same issue. I have 16 core and all example attempt to load 7 workers, each consuming 2 GB of RAM presumably for wasm heap. Even the trivial one image sample[1] crashed about 50% of the time.
[1] https://www.cornerstonejs.org/live-examples/stackbasic
The other part of the issue is here: https://github.com/cornerstonejs/cornerstone3D-beta/blob/a0eefdc34e171ac35375fe58c5da75575ed6d46e/utils/demo/helpers/initCornerstoneWADOImageLoader.js#L18
You allow up to 7 workers (if number of cores allows) and each take 2GB of memory (OpegJpeg + another codec?). On the other hand, chrome 100 on windows allows only for ~14GB or memory to be used in typed array (used to be 8GB in chrome 99-). So it crashed very often.