[wasm] strange thing happening in firefox (fractals)

Hello,
I made a little web app that draw the mandelbrot set with some interactivity (change position, zoom in ...).
I wanted to implement an option to save a version of the fractal with an higher resolution, but after using this function, i get this error : InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable
In Chromium it works well, so did i made a bad design or the javascript/wasm engine of firefox has a bug ?
I’m on Manjaro linux with firefox v76.0.1 and chromium v83.0.4103.61

the source code is here (currently not documented, sorry :sweat_smile:) :
https://gitlab.com/nilsponsard/rust-wasm-mandelbrot
the code concerning the high resolution capture : https://gitlab.com/nilsponsard/rust-wasm-mandelbrot-ts/-/blob/master/index.ts#L27

Ok I thought that placing the data of the image in the global scope will increase performance, but after some tests placing the data allocation in the draw() function solves the problem with very low performance decrease

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.