New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 670057 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 16
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Errors running Emscripten-generated code

Reported by art...@playcanvas.com, Nov 30 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

Steps to reproduce the problem:
1. Run any example of Ammo.js, like: http://kripken.github.io/ammo.js/examples/webgl_demo/ammo.html
2. Get an error "Uncaught TypeError: _emscripten_bind_btTransform_setOrigin_1 is not a function". Sometimes it's different, in another Ammo project it's "Uncaught TypeError: _emscripten_bind_btVector3_btVector3_0 is not a function".
3. 

What is the expected behavior?
Ammo.js works

What went wrong?
Emscripten code failed to run

Did this work before? N/A 

Chrome version: 57.0.2937.0 (Official Build) canary (64-bit)  Channel: canary
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 11.5 r502

Happens only in Canary. Works fine in the stable Chrome and other browsers.
 

Comment 1 by m...@playcanvas.com, Nov 30 2016

Replicated same problem. With dev tools open did slightly change behaviour. And somehow few times loaded. Then figured out it is a racing condition. Basically bindings are not defined by the time code is executed. Previous version might have had different behaviour on binding functions.
Cc: titzer@chromium.org
Components: -Blink Blink>JavaScript>WebAssembly
Owner: bradnelson@chromium.org
Status: Available (was: Unconfirmed)
Seems likely that this is related to the new asm.js verifier. WDYT, Brad?

Comment 3 by kbr@chromium.org, Dec 1 2016

Labels: -Type-Bug -Pri-2 Pri-1 Type-Bug-Regression
Status: Assigned (was: Available)
Saw this bug reported on Twitter. Since this is a regression and important partner, raising to P1. We should make sure a merge isn't needed to M56.

Comment 4 by kbr@chromium.org, Dec 1 2016

Cc: kbr@chromium.org
Could be, investigating...


I've confirmed this is triggered by the new asm.js backend.
This is only on in a finch trial in Canary (it currently won't go to dev).

I've also repro-ed it on the command line with ammo.js
Surprisingly, it does not seem to relate to the recent incremental asm->wasm change that landed.

What seems to happen is that a randomish subset of module exports come back as undefined.

Debugging more...
Ok, figured it out.
Functioned exported under more than one name were being handled wrong.
Almost have a fix...
Fix out for review:
https://codereview.chromium.org/2535723009/
Labels: Hotlist-Asm
Status: Fixed (was: Assigned)

Sign in to add a comment