Search Unity

Error: evaluating 'Module["asm"]["dynCall_iiii"].apply(null,arguments)'

Discussion in 'Web' started by itsDrew, Oct 2, 2018.

  1. itsDrew

    itsDrew

    Joined:
    Aug 16, 2017
    Posts:
    32
    (Only tried on safari so far... version 2018.2.6f1)
    Build and run worked on localhost, though the sound didn't work.
    When I put the build up on my site for testing, I get this error (js alert and in logs. Full stack trace is enabled, but having it disabled doesn't do anything different.)

    Invoking error handler due to
    Error: Out of bounds memory access (evaluating 'Module["asm"]["dynCall_iiii"].apply(null,arguments)')

    Error in log:

    [Error] exception thrown: Error: Out of bounds memory access (evaluating 'Module["asm"]["dynCall_iiii"].apply(null,arguments)'),<?>.wasm-function[43615]@[wasm code]
    <?>.wasm-function[43614]@[wasm code]
    <?>.wasm-function[42300]@[wasm code]
    <?>.wasm-function[42317]@[wasm code]
    <?>.wasm-function[42295]@[wasm code]
    <?>.wasm-function[42293]@[wasm code]
    <?>.wasm-function[44016]@[wasm code]
    wasm-stub@[wasm code]
    dynCall_iiii@[native code]
    blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:487041
    invoke_iiii@blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:364225
    wasm-stub@[wasm code]
    <?>.wasm-function[42282]@[wasm code]
    <?>.wasm-function[31141]@[wasm code]
    <?>.wasm-function[24796]@[wasm code]
    <?>.wasm-function[20669]@[wasm code]
    <?>.wasm-function[40645]@[wasm code]
    <?>.wasm-function[21875]@[wasm code]
    <?>.wasm-function[40636]@[wasm code]
    <?>.wasm-function[40635]@[wasm code]
    <?>.wasm-function[40214]@[wasm code]
    <?>.wasm-function[40213]@[wasm code]
    <?>.wasm-function[40212]@[wasm code]
    <?>.wasm-function[22720]@[wasm code]
    <?>.wasm-function[44017]@[wasm code]
    wasm-stub@[wasm code]
    dynCall_iiiii@[native code]
    blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:487782
    invoke_iiiii@blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:365392
    wasm-stub@[wasm code]
    <?>.wasm-function[42202]@[wasm code]
    <?>.wasm-function[42562]@[wasm code]
    <?>.wasm-function[3178]@[wasm code]
    <?>.wasm-function[3177]@[wasm code]
    <?>.wasm-function[6435]@[wasm code]
    <?>.wasm-function[6433]@[wasm code]
    <?>.wasm-function[6426]@[wasm code]
    <?>.wasm-function[7850]@[wasm code]
    <?>.wasm-function[7849]@[wasm code]
    <?>.wasm-function[7847]@[wasm code]
    <?>.wasm-function[7843]@[wasm code]
    <?>.wasm-function[7840]@[wasm code]
    <?>.wasm-function[7784]@[wasm code]
    <?>.wasm-function[7783]@[wasm code]
    wasm-stub@[wasm code]
    _main@[native code]
    blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:476584
    callMain@blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:511269
    doRun@blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:511957
    run@blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:512130
    printErr (UnityLoader.js:4:10754)
    callMain (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:511500)
    doRun (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:511958)
    run (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:512131)
    runCaller (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:510892)
    removeRunDependency (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:28377)
    (anonymous function) (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:433)
    doCallback (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:89730)
    done (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:89870)
    done (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:72811)
    storeLocalEntry (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:71271)
    (anonymous function) (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:73050)
    onsuccess (blob:https://www.ragingriley.com/93191cf1-7c49-4fc8-8b83-3372746f44e3:2:71621)
    [Log] Invoking error handler due to (UnityLoader.js, line 3)
    Error: Out of bounds memory access (evaluating 'Module["asm"]["dynCall_iiii"].apply(null,arguments)')

    If you'd like to see the bug in action for yourself:
    https://www.ragingriley.com/DodgeTheDeadBrowser/

    I'll leave that up live for a few hours, link will not be live after oct 2.

    Any ideas? Memory is set to 512 which I believe should be more than enough for this game so I don't think thats the issue. (It's a 5 minute game with lightweight art assets).

    Any ideas what the culprit could be?



    Update:
    It is working if I select asm.js as linker target with everything else constant. However, audio is not working. Unfortunately, I don't know why this works and what I am giving up by setting that option.
    Any ideas on the audio?
    (Same as previous, link will not be live after oct 2.)
    https://www.ragingriley.com/DodgeTheDeadBrowser2/
     
    Last edited: Oct 2, 2018
  2. itsDrew

    itsDrew

    Joined:
    Aug 16, 2017
    Posts:
    32
    Holy S*** I think I solved it...
    This app is built for 3 platforms: android, iOS, and web. I built it to easily switch back and forth between all 3 and build for all 3 without modifying anything in the scenes or scripts. After taking a whole bunch of guesses, I finally picked the right one and got it to work... I was using the 'codeless IAP' for android and iOS (I have one item for sale). I had it set to automatically initialize (since that's what unity recommends). Turning off automatic initialization of IAP fixed the bug (for one build. could be an unstable bug. hope not.) No idea how the two are related. Also, if unity devs are reading this... please move the automatic initialization for IAP out of the IAP CATALOG!!! That is not a logical location for it. Took me a while to find its location (and I am a fast googler).