Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

WebGL loading error _Znwj and -1 in Unity 2020.3.1f1

Discussion in 'Web' started by BenrajSD, May 13, 2021.

  1. BenrajSD

    BenrajSD

    Joined:
    Dec 17, 2020
    Posts:
    25
    Hi,

    I have successfully build the WebGL with compression disabled, when loading in browser by hosting in server or using local host getting errors as abort(-1) and _Znwj, what could be the solution for this, also how to allocate memory for browser.

    > Invoking error handler due to
    > abort(-1) at Error
    > at jsStackTrace (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:16334)
    > at stackTrace (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:16505)
    > at abort (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:748)
    > at __Znwj (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:56600)
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[88053]:0x192dfc1
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[44314]:0xefd051
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[78649]:0x1689ce8
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[34805]:0xccac0b
    > at dynCall_iiiii (https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[88909]:0x198060f)
    > at Object.dynCall_iiiii (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:509469)
    > at invoke_iiiii (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:353955)
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[31646]:0xc5e25c
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[30931]:0xc3c3ac
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[4333]:0x1f0c03
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[4331]:0x1f08db
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[8298]:0x357c96
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[8296]:0x356b41
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[10452]:0x4255dc
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[8539]:0x372573
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[10878]:0x455b9b
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[10554]:0x42fa4d
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[10554]:0x42fa62
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[10549]:0x42f579
    > at https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[10542]:0x42d601
    > at dynCall_v (https://localhost:8080/Build/c8784875e9fb266c54beb524c35a1f9a.wasm:wasm-function[88936]:0x1980aaa)
    > at Object.dynCall_v (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:521604)
    > at browserIterationFunc (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:178372)
    > at Object.runIter (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:181433)
    > at Browser_mainLoop_runner (https://localhost:8080/Build/31bd99bf16e065264233b311a369487d.js:2:179895)![alt
    > text][1]
     

    Attached Files:

  2. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
    Can you make a Development build and test again? That should give a proper callstack that does not have those cryptic "wasm-function[10789]" frames in them, but instead will have proper function names that can give a clue as to where the issue comes from.
     
  3. BenrajSD

    BenrajSD

    Joined:
    Dec 17, 2020
    Posts:
    25
    Dev build also giving the same error
     
  4. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
  5. BenrajSD

    BenrajSD

    Joined:
    Dec 17, 2020
    Posts:
    25
    Could you please help on this, getting this error when I takes dev build, it's with another project

    Failed running command "C:/Program Files/Unity/Hub/Editor/2021.1.6f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" -E "C:/Program Files/Unity/Hub/Editor/2021.1.6f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten\emcc" @"D:\UnityProjects\03_Workfiles\23_Assembler\KiksarAssembler_WebGL\Assets\..\Temp\emcc_arguments.resp" (process exit code: 1)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    Failed process stderr log:
    warning: unexpected number of arguments 1 in call to '__cxa_pure_virtual', should be 0
    warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    warning: unexpected number of arguments 5 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    warning: unexpected number of arguments 3 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0
    error: unresolved symbol: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEj
    error: unresolved symbol: _Znaj
    error: unresolved symbol: _Znwj
    Aborting compilation due to previous errors | undefined
    Traceback (most recent call last):
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py", line 3063, in <module>
    sys.exit(run())
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py", line 1780, in run
    final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py", line 2274, in emscripten
    emscripten._main(cmdline)
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2233, in _main
    return temp_files.run_and_clean(lambda: main(
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\tempfiles.py", line 93, in run_and_clean
    return func()
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2238, in <lambda>
    DEBUG=DEBUG,
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2164, in main
    temp_files=temp_files, DEBUG=DEBUG)
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 86, in emscript
    glue, forwarded_data = compiler_glue(metadata, libraries, compiler_engine, temp_files, DEBUG)
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 218, in compiler_glue
    glue, forwarded_data = compile_settings(compiler_engine, libraries, temp_files)
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 541, in compile_settings
    cwd=path_from_root('src'), error_limit=300)
    File "C:\Program Files\Unity\Hub\Editor\2021.1.6f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\jsrun.py", line 132, in run_js
    raise Exception('Expected the command ' + str(command) + ' to finish with return code ' + str(assert_returncode) + ', but it returned with code ' + str(proc.returncode) + ' instead! Output: ' + str(ret)[:error_limit])
    Exception: Expected the command ['C:/Program Files/Unity/Hub/Editor/2021.1.6f1/Editor/Data\\Tools\\nodejs\\node.exe', '--stack_size=8192', '--max-old-space-size=4096', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\src\\compiler.js', 'C:\\Users\\Admin\\AppData\\Local\\Temp\\tmpo1i6gg.txt', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Audio.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\case_1174367_workaround.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\case_1179945_workaround.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\case_1187965_workaround.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\case_1208971_workaround.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Cursor.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\dlopen.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Eval.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\FileSystem.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Logging.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Profiler.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\ScreenOrientation.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\SystemInfo.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\UnetWebSocket.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Video.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebCam.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebRequest.js', 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.1.6f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\src\\library_pthread_stub.js'] to finish with return code 0, but it returned with code 1 instead! Output: // The Module object: Our interface to the outside world. We import
    // and export values on it. There are various ways Module can be used:
    // 1. Not defined. We create it here
    // 2. A function parameter, function(Module) { ..generated code.. }
    // 3. pre-run appended it, var Module = {}; ..generated
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  6. BenrajSD

    BenrajSD

    Joined:
    Dec 17, 2020
    Posts:
    25
    Normal build is successful but have following errors mentioned in the beginning
    _Znwj and -1
     
  7. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    953
    Already answered to this in the other thread at https://forum.unity.com/threads/development-build-fails-in-webgl-development.553618/ :

    This error is quite peculiar, these lines are saying that the functions

    std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char> >::reserve(unsigned int)
    operator new[](unsigned int)
    operator new(unsigned int)

    are missing, though these should be coming from the standard C++ library, they are not Unity provided functions.

    Are you by any chance compiling any plugins in your code that are precompiled for WebGL? The fact that all of those have the parameter "unsigned int" in them suggests that maybe the version they were precompiled for is out of date. Try removing external plugins from the project if so to see if one of those would uncover the issue.
     
  8. BenrajSD

    BenrajSD

    Joined:
    Dec 17, 2020
    Posts:
    25
    I am using DoTween, Xzimng for face tracking and Gltf - all supports WebGL, will check it
     
    Last edited: May 24, 2021