Search Unity

Running a WebGL build

Discussion in 'Linux' started by JKarkkainen, Sep 26, 2016.

  1. JKarkkainen

    JKarkkainen

    Joined:
    Mar 5, 2013
    Posts:
    11
    When trying to run a WebGL build (either with Chrome or Firefox), I get an abort after the loading bar has finished. It isn't immediate, but the screen doesn't change. Console shows (at least on one occasion) the abort to be an abort(9). When running a development build with prebuilt engine, I get an "Array buffer allocation failed".

    Is this a bug in the Linux WebGL build process, a bug in my project, or perhaps something in Firefox/Chrome? I realize it might be hard to pinpoint, but maybe others have had similar problems?

    Using Linux Mint 18.
     
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    I believe it means that the build is trying to allocate more memory than your browser will allow.
     
  3. JKarkkainen

    JKarkkainen

    Joined:
    Mar 5, 2013
    Posts:
    11
    Thanks for the response! Any idea how to increase the browser memory limit (Chrome/Firefox)? Or is it a setting in the Unity? I tried increasing the WebGL memory amount in the player settings, but it didn't help.

    EDIT: Actually, now I got this from a WebGL build on Firefox: "uncaught exception: abort("external function '_Z32RegisterAllStrippedInternalCallsv' is missing. perhaps a side module was not linked in? if this function was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment") at jsStackTrace (UnityEngine.js:915:12uncaught exception: abort("external function '_Z32RegisterAllStrippedInternalCallsv' is missing. perhaps a side module was not linked in? if this function was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment") at jsStackTrace (UnityEngine.js:915:12"

    I have no idea what I should do?
     
    Last edited: Sep 27, 2016
  4. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,071
    Have you tried disabling code stripping in Player Settings?
    Can you file a bug report with your repro project if disabling stripping makes the issue go away?
     
  5. JKarkkainen

    JKarkkainen

    Joined:
    Mar 5, 2013
    Posts:
    11
    Oh wow, I got it to work. It was the Strip Engine code switch, but actually it was disabled for some odd reason. When I enabled stripping engine code it worked. Oh yeah and the version was 5.5xb2
     
  6. Martian-Games

    Martian-Games

    Joined:
    Jan 19, 2012
    Posts:
    44
    One would think missing functions might be a problem *caused* by stripping code, but in this case it is, in fact, the reverse. Mind-Bogglingly: when you crash due to WebGL missing libraries, you must actually *enable* code stripping. Something in the process of stripping brings about these libraries we need. ;)