Cesium: crunch.js error

Created on 27 Sep 2017  路  16Comments  路  Source: CesiumGS/cesium

Run Sandcastle and you'll see Invalid asm.js: Invalid member of stdlib coming from crunch over and over again. @bagnell do we need to recompile this from source? Are we sure the feature still works?

category - graphics priority - next release type - bug

Most helpful comment

Can confirm I've started seeing this on newer chrome releases.

All 16 comments

I haven't seen that error. We have tests that load and render models with crunch compressed textures so I believe it still works.

Can confirm I've started seeing this on newer chrome releases.

seems it started since chrome 61

FWIW, this is apparently caused by Chrome now having that chrome://flags/#enable-asm-webassembly enabled by default.

Experimental Validate Asm.js and convert to WebAssembly when valid.聽Mac, Windows, Linux, Chrome OS, Android
Validate Asm.js when "use asm" is present and then convert to WebAssembly.聽#enable-asm-webassembly

Disabling it makes the message go away. Possibly because WASM doesn't have multithreading yet (or things related to it, I haven't really checked - maybe SharedArrayBuffer or Atomics...)

I found that out here randomly trying to understand (to no avail yet) why Chrome 62 is making my multi-threaded (2 threads) emulator very slow while it's working just fine on Chrome 61 and other latest browser versions...

This is happening to me on Firefox 56, Ubuntu 16.04:

TypeError: asm.js type error: 'byteLength' is not a standard constant or typed array name

I'm seeing this every time I load sandcastle in chrome

Labeling next release. Debugging and fixes are welcome!

I'm assuming we just need to recompile crunch.js with the latest toolchain. @bagnell did you document how to do this anywhere?

Nevermind, I forgot we contributed this back to the crunch repository, I found it: https://github.com/BinomialLLC/crunch

Should be trivial to build a new version. I'll open a PR

@mramato since I'm getting the same errors on a project of mine, what emscripten version did you use to get rid of them here?
I'm still getting them with 1.37.22. Maybe I should try the incoming branch...

@adriweb, I installed "latest" from the command line and emcc --version reports 1.37.21 (although according to github 1.37.22 is the latest). I'm also on Windows (though I'm guessing that it doesn't matter).

It's also possible that there are multiple ways to trigger the error and it just so happens that this case was fixed but yours still happens. (but I know very little about emscripten or Chrome's conversion to webasm).

Alright thanks. I guess what makes it error/warn (and fail validation making it very slow :() is because I'm using Atomics / SharedArrayBuffer (well, because I have pthreads stuff).
It can't hurt to use latest I suppose, but in that case it won't help, since wasm doesn't have threading yet.

Folks, I know this issue has been closed but I am seeing the error "Invalid asm.js: Invalid member of stdlib". I am running Cesium version 1.43 on Chrome version 66.0.3359.33 on macOS 10.13.3.

@jimmyangel do you have any steps to reproduce this?

Ooops! My bad. I am really sorry for reporting this -- I made a mistake in my configuration and I was still pointing to an older version of Cesium. I checked again with the correct 1.43, and the error is gone.

No problem @jimmyangel! We're here to help =)

Was this page helpful?
0 / 5 - 0 ratings