system_info() in browser crashes once memory usage goes over 2GB
Bug Report
Steps to Reproduce:
- Open the examples/blocks/src/dataset/index.html example in Edge of Chrome.
- Click 'delete'
- Change
rowsto 10'000'000 andupdate delayto 100ms - Click
Generate - At the point the heap line in Server Memory chart gets to a bit above 2GB the charts stop updating
- Opening dev tools window you will see an exception like one of the following:
Example exception 1: perspective-viewer.js:3135 Uncaught (in promise) Error: Error: 18446744071657544488 can't be represented as a JavaScript number at 009d511e:0x2246c2 at 009d511e:0x127c98 at 009d511e:0x22657d at 009d511e:0x189263 at 009d511e:0x6b2ab at 009d511e:0xcf63e at 009d511e:0x1a7abc
Example exception 2:
Uncaught (in promise) RangeError: Start offset -2145700264 is outside the bounds of the buffer
at new Uint8Array (
Example exception 3:
Uncaught (in promise) RangeError: offset is out of bounds
at Uint8Array.set (
Expected Result:
- I expect system_info() calls to work and not throw exceptions.
- I expect perspective to be able to use up to 4GB of wasm memory without crashing.
Actual Result:
One of the example exceptions happens. Exception 1 stops system_info() from working. Exceptions 2 and 3 completely halt perspective worker.
Environment:
Observed on Windows 11, Edge and Chrome browsers. perspective 3.7.4
Hi abalabin, I'll be happy to take this one
Hi @Mayank2930 , thanks for the offer, but I've found the problem already and have a fix locally and will push it along with a couple other fixes a little later.
Thanks for the report!
This (the BigInt conversion issue) was fixed in #3047 and released in version v3.8.0 (Sep 2nd 2025).
One point worth making wrt:
I expect perspective to be able to use up to 4GB of wasm memory without crashing.
This isn't achievable with the CDN perspective (which is a wasm32 only build). I can only reliably allocate ~1.5gb on Chrome on my laptop in this mode, your results may vary but this is the practical maximum I've experienced. Perspective can be alternatively compiled from GitHub source to run in wasm64 mode, which e.g. we do for https://prospective.co (memory status in the top menu bar).