Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Uncaught RuntimeError: memory access out of bounds (WebGL on Unity Play)

Discussion in 'Editor & General Support' started by Mantichore_1, Feb 28, 2021.

  1. Mantichore_1

    Mantichore_1

    Joined:
    Feb 17, 2021
    Posts:
    3
    Hi, I am trying to get my Unity LEGO microgame uploaded to play.unity.com.
    I can build to WebGL and it uploads the game, but when I try to play it in my browser (chrome) it gives the following error:

    'An error occured running the Unity content on this page. See your browser Javascript console for more info. the error was: Uncaught RuntimeError: memory access out of bounds.'

    I thought maybe the game was too heavy so I tried stripping the whole game down until there was barely anything left, but it still gives the same error when playing the uploaded build.

    The chrome console shows these errors:

    Code (JavaScript):
    1. Uncaught RuntimeError: memory access out of bounds
    2.     at <anonymous>:wasm-function[39464]:0xe48aa0
    3.     at <anonymous>:wasm-function[39463]:0xe48a33
    4.     at <anonymous>:wasm-function[39462]:0xe489c9
    5.     at <anonymous>:wasm-function[49594]:0x10a110c
    6.     at <anonymous>:wasm-function[49601]:0x10a1f8f
    7.     at <anonymous>:wasm-function[49599]:0x10a1a95
    8.     at <anonymous>:wasm-function[49598]:0x10a181f
    9.     at <anonymous>:wasm-function[25339]:0xb97bac
    10.     at dynCall_iiiii (<anonymous>:wasm-function[52471]:0x111f01b)
    11.     at Object.dynCall_iiiii (blob:https://play.unity3dusercontent.com/08f085a7-7fd5-42f4-a591-d067454a8d6a:8:463265)
    12.     at invoke_iiiii (blob:https://play.unity3dusercontent.com/08f085a7-7fd5-42f4-a591-d067454a8d6a:8:331727)
    13.     at <anonymous>:wasm-function[50596]:0x10c8f11
    14.     at <anonymous>:wasm-function[50050]:0x10b0ed8
    15.     at <anonymous>:wasm-function[4469]:0x1b7b8d
    16.     at <anonymous>:wasm-function[4467]:0x1b7865
    17.     at <anonymous>:wasm-function[8137]:0x2f5ff6
    18.     at <anonymous>:wasm-function[8134]:0x2f4e18
    19.     at <anonymous>:wasm-function[10603]:0x40081f
    20.     at <anonymous>:wasm-function[8402]:0x3162cc
    21.     at <anonymous>:wasm-function[10989]:0x42cea0
    22.     at <anonymous>:wasm-function[10703]:0x40a3f0
    23.     at <anonymous>:wasm-function[10703]:0x40a405
    24.     at <anonymous>:wasm-function[10698]:0x409f0f
    25.     at <anonymous>:wasm-function[10691]:0x408112
    26.     at dynCall_v (<anonymous>:wasm-function[52485]:0x111f24d)
    27.     at Object.dynCall_v (blob:https://play.unity3dusercontent.com/08f085a7-7fd5-42f4-a591-d067454a8d6a:8:471234)
    28.     at browserIterationFunc (blob:https://play.unity3dusercontent.com/08f085a7-7fd5-42f4-a591-d067454a8d6a:8:166325)
    29.     at Object.runIter (blob:https://play.unity3dusercontent.com/08f085a7-7fd5-42f4-a591-d067454a8d6a:8:169386)
    30.     at Browser_mainLoop_runner (blob:https://play.unity3dusercontent.com/08f085a7-7fd5-42f4-a591-d067454a8d6a:8:167848)
     
  2. ChrisRoth

    ChrisRoth

    Joined:
    May 30, 2013
    Posts:
    4
    Did you manage to sort this? I'm not seeing this but I do get an array index out of bounds error loading my scene with some sizeable (but not ridiculous) studio built & imported models.

    I did notice that the files generated didnt shrink when I took models out of my scene. Part of the build process popup goes through importing files and I noticed it was importing ones I didn't use in any of my scenes so I think that's the prefabs being included (so my building wasn't in the scene but was a prefab as that's my pattern - import and turn into a prefab for creating multiple copies - and it was possibly still included in the build - could be that in a normal game, the builder wouldn't know that some code didnt instantiate the prefab so it has to include it or something).
     
  3. unofficialgaming

    unofficialgaming

    Joined:
    Jan 2, 2018
    Posts:
    10
    I currently have the same problem. with "Uncaught RuntimeError: memory access out of bounds".
    the scene loads in editor and the scene load in a exe build, but in webgl i get that error message.

    I've tried removing all custom scripts but that didn't fix the issue.

    I tried making all the imported objects static. didn't fix the issue.

    I tried removing all objects from my scene and that did allow the scene to load, but isn't really a usable fix.
     
  4. unofficialgaming

    unofficialgaming

    Joined:
    Jan 2, 2018
    Posts:
    10
    I was able to fix this issue,

    I disabled the line :
    meshCombiner.GridExtents = optimizationBounds.size;

    found in the BrickMeshCombiner script, which is on the GameManager object.