bbchallenge / bbchallenge

Frontend of https://bbchallenge.org
11 stars 11 forks source link

[Firefox] Broken space-time diagrams when the number of simulated steps >= 2^15 #11

Open AndreyAkinshin opened 2 years ago

AndreyAkinshin commented 2 years ago

Repro: https://bbchallenge.org/7410754&s=32768 (it just draws a black screen without any warnings).

tcosmo commented 2 years ago

Thank you for reporting this bug!

Unfortunately, it seems to be user-dependent because it is working fine on my computer (macOs M1 with Chrome):

Screenshot 2022-06-01 at 12 36 33

This is not entirely surprising because the simulation to generate the diagrams is run on client side in JS:

https://github.com/bbchallenge/bbchallenge/blob/ee3799e88b1d6a9a9cce9cd6f3de94bc977dcca8/src/lib/tm.ts#L241

It would be really cool to port this code in rust/WASM to allow for more efficiency and hopefully run more iterations on all devices.

Maybe @modderme123 would be interested!

AndreyAkinshin commented 2 years ago

It seems that it's a Firefox-specific issue (I'm using Firefox 100.0.2). Here is how it looks like: image


ncaught (in promise) 
Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "https://bbchallenge.org/_app/chunks/tm-b1a12469.js", lineNumber: 7, columnNumber: 0, data: null, stack: "$@https://bbchallenge.org/_app/chunks/tm-b1a12469.js:7:2311\nx@https://bbchallenge.org/_app/pages/index.svelte-8d4a2129.js:11:18272\nts/<@https://bbchallenge.org/_app/pages/index.svelte-8d4a2129.js:11:19362\n" }
​```
tcosmo commented 2 years ago

Ach! That's unfortunate!

Might be related to: https://bugzilla.mozilla.org/show_bug.cgi?id=941146