Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

WebAssembly Build Failing

Discussion in '5.6 Beta' started by bigbrainz, Feb 6, 2017.

  1. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    85
    I can make a Developer build just fine, but a normal build gives me this error:

    Running 5.6.0b5

    Turning off code stripping doesn't help.

    Sometimes I only get this error:

     
  2. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    85
    Ah, I see 5.6.0b6 is up. I'll try that.
     
  3. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    85
    No luck. Same error in 5.6.0b6
     
  4. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    85
    Trying 5.6.0b7
     
  5. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    85
    Argh. No luck. I can successfully make a WebAssembly build if I just open up an empty project, so looks like I'll have to track down what in our project is triggering that problem. Strange. It runs all the way through the build process btw before it fails. For example it completes "Compile asm.js module" and it LOOKS like it completes "Compile WebAssembly module," but then it fails after sitting on that for a while.
     

    Attached Files:

  6. Hagn

    Hagn

    Joined:
    Apr 1, 2013
    Posts:
    8
    Might be the same error I'm getting (same error code -1073740791). Reported it last week with no response yet (876807).
    For me the asm2wasm process crashes when reaching 2GB ram usage.
     
    Last edited: Feb 7, 2017
  7. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,653
    This is indeed a memory problem specific to Unity for Windows. We have a fix and will land to 5.6 pretty soon.
     
  8. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    85
    Excellent! The sooner the better so I can start hammering on WebAssembly as much as possible while we're still in Beta.
     
    StaffanEk likes this.
  9. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    85
    Still no luck still in 5.6.0b9 . . . :(
     
    StaffanEk likes this.
  10. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    129
    No luck in 5.6.0b10 either
     
    StaffanEk likes this.
  11. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    929
    Fixes are in b11. Stay tuned.
     
    kou_yeung and StaffanEk like this.
  12. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    85
    Build successsfully in 5.6.0b11!!

    I then got a different error in the browser, but I'm still troubleshooting that one to see if it's on my end. Yay!!
     
    StaffanEk likes this.
  13. Pontik

    Pontik

    Joined:
    Feb 26, 2014
    Posts:
    17
    Build is successfull, but browser stop working on LinkError: imported Memory with incompatible size
    IndexedDB UnknownErr: ActorsParent.cpp:594 (unbekannt)
    trying binaryen method: native-wasm UnityLoader.js:1
    asynchronously preparing wasm UnityLoader.js:1
    binaryen method succeeded. UnityLoader.js:1
    LinkError: imported Memory with incompatible size
     
  14. Pontik

    Pontik

    Joined:
    Feb 26, 2014
    Posts:
    17
    With 128 mb memory size it has worked for me! But i am not realy sure it use webassembly and not the fallback to asm.js...

    Successfully compiled asm.js code (total compilation time 4ms; not stored in cache (too small to benefit)) UnityLoader.js
    Successfully compiled asm.js code (total compilation time 3ms; not stored in cache (too small to benefit)) UnityLoader.js
    Successfully compiled asm.js code (total compilation time 4ms; not stored in cache (too small to benefit)) UnityLoader.js
    IndexedDB UnknownErr: ActorsParent.cpp:594 (unbekannt)
    trying binaryen method: native-wasm UnityLoader.js:1
    asynchronously preparing wasm UnityLoader.js:1
    binaryen method succeeded. UnityLoader.js:1
    unreachable code after return statement 43169b7e-0df5-4f51-a6fa-d935b3cb1261:228:4
    unreachable code after return statement 43169b7e-0df5-4f51-a6fa-d935b3cb1261:2148:4
    unreachable code after return statement 43169b7e-0df5-4f51-a6fa-d935b3cb1261:228:4
    SyntaxError: JSON.parse: expected double-quoted property name at line 1 column 46 of the JSON data GCTelemetry.jsm:194:16
    IndexedDB is not available. Data will not persist in cache and PlayerPrefs will not be saved. 43169b7e-0df5-4f51-a6fa-d935b3cb1261:9
    Initialize engine version: 5.6.0b11 (a13db154d9f7)
    43169b7e-0df5-4f51-a6fa-d935b3cb1261:8703
    Creating WebGL 2.0 context. UnityLoader.js:1
    Renderer: Mozilla
    43169b7e-0df5-4f51-a6fa-d935b3cb1261:8703
    Vendor: Mozilla
    43169b7e-0df5-4f51-a6fa-d935b3cb1261:8703
    Version: OpenGL ES 3.0 (WebGL 2.0)
    43169b7e-0df5-4f51-a6fa-d935b3cb1261:8703
    GLES: 3
    43169b7e-0df5-4f51-a6fa-d935b3cb1261:8703
    EXT_color_buffer_float GL_EXT_color_buffer_float EXT_texture_filter_anisotropic GL_EXT_texture_filter_anisotropic EXT_disjoint_timer_query GL_EXT_disjoint_timer_query OES_texture_float_linear GL_OES_texture_float_linear WEBGL_compressed_texture_s3tc GL_WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info GL_WEBGL_debug_renderer_info WEBGL_lose_context GL_WEBGL_lose_context MOZ_WEBGL_lose_context GL_MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc GL_MOZ_WEBGL_compressed_texture_s3tc
    43169b7e-0df5-4f51-a6fa-d935b3cb1261:8703
    OPENGL LOG: Creating OpenGL ES 3.0 graphics device ; Context level <OpenGL ES 3.0> ; Context handle 1
    43169b7e-0df5-4f51-a6fa-d935b3cb1261:8703
    UnloadTime: 1.450000 ms
     
  15. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    85
    I got quite a few errors in Firefox until I updated to 52.0.
    Canary launched successfully first try.
    Chrome also launches in version Version 57.0.2987.98 beta (64-bit).

    I'm still getting quite a few errors, but it's still able to run. I have to sort out which of these errors are a result of moving from 5.4 to 5.6 and which are directly tied to WebAssembly.
     
  16. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    129
    Hi all,

    I was able to make a build in b11, bunch of issues though - but to be expected.

    However, I always get a asm2wasm.exe crash when building with full exceptions on.

    Has anybody experienced this as well? Is there something I am missing?

    -Pieter
     
  17. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    929
    Got an error with WASM with full exceptions too. Will log a bug but please file a report with logs regardless so we can check if we're seeing the same.