Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crunch.js error #5847

Closed
mramato opened this issue Sep 27, 2017 · 16 comments
Closed

crunch.js error #5847

mramato opened this issue Sep 27, 2017 · 16 comments

Comments

@mramato
Copy link
Contributor

mramato commented Sep 27, 2017

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?

@bagnell
Copy link
Contributor

bagnell commented Sep 27, 2017

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

@denverpierce
Copy link
Contributor

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

@eitanfr
Copy link

eitanfr commented Oct 3, 2017

seems it started since chrome 61

@adriweb
Copy link

adriweb commented Oct 7, 2017

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...

@thw0rted
Copy link
Contributor

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

@hpinkos
Copy link
Contributor

hpinkos commented Nov 8, 2017

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

@pjcozzi
Copy link
Contributor

pjcozzi commented Nov 8, 2017

Labeling next release. Debugging and fixes are welcome!

@mramato
Copy link
Contributor Author

mramato commented Nov 9, 2017

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

@mramato
Copy link
Contributor Author

mramato commented Nov 9, 2017

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 added a commit that referenced this issue Nov 9, 2017
Recompiled crunch.js with latest emscripten toolchain.

Fixes #5847
mramato added a commit that referenced this issue Nov 9, 2017
Recompiled crunch.js with latest emscripten toolchain, the version is the
same as what we were already using.

I also updated the license header to match what is in license.txt on their
repository.

Fixes #5847
@adriweb
Copy link

adriweb commented Nov 9, 2017

@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...

@mramato
Copy link
Contributor Author

mramato commented Nov 9, 2017

@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).

@adriweb
Copy link

adriweb commented Nov 9, 2017

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.

@jimmyangel
Copy link
Contributor

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.

@hpinkos
Copy link
Contributor

hpinkos commented Mar 19, 2018

@jimmyangel do you have any steps to reproduce this?

@jimmyangel
Copy link
Contributor

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.

@hpinkos
Copy link
Contributor

hpinkos commented Mar 19, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants