The new chrome release seems to bring a problems for unity webgl builds… since the update my widget throws erros at random, but on older versions or on another browsers seem to work just fine… I leave a print of my chrome console here:
Can the problem be on my side? I have just wasted a whole work day trying to figure this out, but it seems to only happen on this specific version of google chrome, so i can only think that the problem isn’t from my code…
Edit: The error sometimes happens while loading, other times is completely random while playing
I can confirm this happens with our WebGL build as well. Seems like the same behavior, and I’m not able to reproduce on Chrome <86. We’re on Unity 2019.2.21f1 .
Testing out the linked page in Chrome 86.0.4240.75 on Windows 10, the page does run correctly for me, and renders a chair that can be spun by dragging with mouse.
@jukka_j I was able to reproduce the issue with the linked page/chair.
I looks like the exact same thing we’re experiencing: it happens every once in a while, not always. Could you try refreshing a bunch of times? Here’s a video of me hitting the bug after a couple of times.
The error doesn’t seem to happen consistently, so you might need to try a few times to reproduce the issue. The URL provided by @tiggaxxx threw an error after a few tries on our end, and as mentioned by @unity3dat our own application exhibits the same behaviour.
@jukka_j There’s several errors than tend to pop up, including a memory out of range error which unfortunately haven’t been able to get a stack trace of yet. But here’s stack traces for two of the errors I did manage to reproduce in a build with the --profiling-funcs argument for emscripten:
Hello, My Unity version is 2018.3.0f2, I have same error at web gl build.
I created a new empty project, and change to WebGL platform, and build with development build checked.
I run a local http server, and I open a local host index.html that unity built.
After I loaded a sample scene in browser, I keep reloading (with f5 key) in chrome browser. Keep going load a sample scene → reload → load a sample scene → reload… I can see “memory access out of bounds” exception, about 10 over times try.
Thank you for investigation.
Chrome version is 86.0.4240.75 official build, 64 bit
browser console log:
exception thrown: RuntimeError: memory access out of bounds,RuntimeError: memory access out of bounds
at __ZN13MemoryManager8AllocateEjjRK10MemLabelId15AllocateOptionsPKci (:wasm-function[1846]:0x9a557)
at __Znwj (:wasm-function[1974]:0xa2e90)
at _ZNSt3__214__split_bufferIPK10Il2CppTypeRNS_9allocatorIS3_EEEC2EjjS6 (:wasm-function[33863]:0x801fd7)
at _ZNSt3__26vectorIPK10Il2CppTypeNS_9allocatorIS3_EEE21__push_back_slow_pathIRKS3_EEvOT (:wasm-function[33853]:0x801cf1)
at dynCall_vii (:wasm-function[37557]:0x89739d)
at Object.dynCall_vii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:24811:38)
at invoke_vii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:17462:24)
at __ZL13GetSharedInstPK17Il2CppGenericInst (:wasm-function[34244]:0x80d6f7)
at __ZN6il2cpp2vm13MetadataCache23GetInvokerMethodPointerEPK10MethodInfoPK20Il2CppGenericContext (:wasm-function[34241]:0x80d564)
at dynCall_iii (:wasm-function[37470]:0x896b0a)
at Object.dynCall_iii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:24376:38)
at invoke_iii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:16766:31)
at __ZN6il2cpp8metadata13GenericMethod9GetMethodEPK19Il2CppGenericMethod (:wasm-function[36216]:0x854806)
at __ZN6il2cpp8metadataL27ConstructGenericArrayMethodERKNS0_18GenericArrayMethodEP11Il2CppClassP20Il2CppGenericContext (:wasm-function[35210]:0x83301b)
at dynCall_iiii (:wasm-function[37477]:0x896bc0)
at Object.dynCall_iiii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:24411:39)
at invoke_iiii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:16822:32)
at __ZN6il2cpp8metadataL27PopulateArrayGenericMethodsEP11Il2CppClasstRKNSt3__26vectorINS0_18GenericArrayMethodENS3_9allocatorIS5_EEEE (:wasm-function[35209]:0x832f1e)
at dynCall_vii (:wasm-function[37557]:0x89739d)
at Object.dynCall_vii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:24811:38)
at invoke_vii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:17462:24)
at __ZN6il2cpp8metadataL17SetupArrayMethodsEP11Il2CppClass (:wasm-function[35205]:0x832c7b)
at __ZN6il2cpp8metadata13ArrayMetadata16SetupArrayVTableEP11Il2CppClassRKNS_2os12FastAutoLockE (:wasm-function[35203]:0x8324af)
at __ZN6il2cpp2vmL11SetupVTableEP11Il2CppClassRKNS_2os12FastAutoLockE (:wasm-function[33834]:0x800a6d)
at __ZN6il2cpp2vm18SetupMethodsLockedEP11Il2CppClassRKNS_2os12FastAutoLockE (:wasm-function[33832]:0x8005af)
at __ZN6il2cpp2vmL10InitLockedEP11Il2CppClassRKNS_2os12FastAutoLockE (:wasm-function[33830]:0x80026b)
at dynCall_vii (:wasm-function[37557]:0x89739d)
at Object.dynCall_vii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:24811:38)
at invoke_vii (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:17462:24)
at __ZN6il2cpp2vm5Class4InitEP11Il2CppClass (:wasm-function[33829]:0x7fffbd)
at __ZN6il2cpp2vm5Array11NewSpecificEP11Il2CppClassj (:wasm-function[35937]:0x84d828)
at __ZN6il2cpp2vm5Array3NewEP11Il2CppClassj (:wasm-function[35936]:0x84d81c)
at __ZN6il2cpp2vm5Array9NewCachedEP11Il2CppClassj (:wasm-function[34463]:0x81b8e0)
at __Z19scripting_array_new17ScriptingClassPtrjj (:wasm-function[3328]:0xfc975)
at __ZN9Scripting5Unity11Collections39DeallocateOnJobCompletionAttributeProxy9InitProxyEv (:wasm-function[3923]:0x107cb3)
at __ZNK35ScriptingManagedObjectProxyRegistry11InitProxiesEv (:wasm-function[7606]:0x28cf55)
at __Z26FillCommonScriptingClassesR22CommonScriptingClasses (:wasm-function[7603]:0x28b102)
at __ZN11MonoManager29RebuildCommonScriptingClassesEv (:wasm-function[7088]:0x25e62b)
at __ZN11MonoManager13AwakeFromLoadE17AwakeFromLoadMode (:wasm-function[7072]:0x25d4e2)
at __ZN18AwakeFromLoadQueue28InvokePersistentManagerAwakeEPNS_4ItemEj17AwakeFromLoadMode (:wasm-function[2386]:0xc25cd)
at __ZN17PersistentManager27IntegrateAllThreadedObjectsEv (:wasm-function[2381]:0xc22d3)
at __ZN17PersistentManager10ReadObjectEi17AwakeFromLoadMode (:wasm-function[2377]:0xc1963)
at __Z31ReadObjectFromPersistentManageri (:wasm-function[2375]:0xc1872)
at __ZNK4PPtrI6ObjectEcvPS0_Ev (:wasm-function[674]:0x3a4d2)
at __Z24PlayerLoadGlobalManagersPKcS0_j (:wasm-function[7902]:0x2a39a3)
at __Z24PlayerInitEngineGraphicsb (:wasm-function[7878]:0x2a0dc8)
at __Z15InitWebGLPlayeriPPc (:wasm-function[7797]:0x297e92)
at _main (:wasm-function[7796]:0x2979a6)
at Object._main (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:24041:32)
at Object.callMain (blob:http://localhost:8000/a7c612f2-cf42-4431-bc0a-720350292030:25300:28)
printErr @ UnityLoader.js:1044
callMain @ a7c612f2-cf42-4431-bc0a-720350292030:25313
doRun @ a7c612f2-cf42-4431-bc0a-720350292030:25336
run @ a7c612f2-cf42-4431-bc0a-720350292030:25348
runCaller @ a7c612f2-cf42-4431-bc0a-720350292030:25284
removeRunDependency @ a7c612f2-cf42-4431-bc0a-720350292030:1023
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:12
doCallback @ a7c612f2-cf42-4431-bc0a-720350292030:5438
done @ a7c612f2-cf42-4431-bc0a-720350292030:5449
done @ a7c612f2-cf42-4431-bc0a-720350292030:4577
storeLocalEntry @ a7c612f2-cf42-4431-bc0a-720350292030:4495
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4588
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4514
IndexedDB (async)
loadRemoteEntry @ a7c612f2-cf42-4431-bc0a-720350292030:4512
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4586
reconcile @ a7c612f2-cf42-4431-bc0a-720350292030:4584
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4349
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4438
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
success (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4447
IndexedDB (async)
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4435
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4385
IndexedDB (async)
getDB @ a7c612f2-cf42-4431-bc0a-720350292030:4360
getRemoteSet @ a7c612f2-cf42-4431-bc0a-720350292030:4425
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:4345
getLocalSet @ a7c612f2-cf42-4431-bc0a-720350292030:4418
syncfs @ a7c612f2-cf42-4431-bc0a-720350292030:4343
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:5456
syncfs @ a7c612f2-cf42-4431-bc0a-720350292030:5452
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:11
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:15
callRuntimeCallbacks @ a7c612f2-cf42-4431-bc0a-720350292030:849
preRun @ a7c612f2-cf42-4431-bc0a-720350292030:878
run @ a7c612f2-cf42-4431-bc0a-720350292030:25326
runCaller @ a7c612f2-cf42-4431-bc0a-720350292030:25284
removeRunDependency @ a7c612f2-cf42-4431-bc0a-720350292030:1023
receiveInstance @ a7c612f2-cf42-4431-bc0a-720350292030:1129
receiveInstantiatedSource @ a7c612f2-cf42-4431-bc0a-720350292030:1144
Promise.then (async)
instantiateArrayBuffer @ a7c612f2-cf42-4431-bc0a-720350292030:1149
doNativeWasm @ a7c612f2-cf42-4431-bc0a-720350292030:1163
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:1227
(anonymous) @ a7c612f2-cf42-4431-bc0a-720350292030:18680
UnityLoader.loadCode.Module @ UnityLoader.js:830
script.onload @ UnityLoader.js:795
load (async)
loadCode @ UnityLoader.js:793
processWasmFrameworkJob @ UnityLoader.js:827
job.callback @ UnityLoader.js:475
setTimeout (async)
job.complete @ UnityLoader.js:490
processWasmCodeJob @ UnityLoader.js:822
job.callback @ UnityLoader.js:475
setTimeout (async)
job.complete @ UnityLoader.js:490
(anonymous) @ UnityLoader.js:887
decompressor.worker.onmessage @ UnityLoader.js:89
UnityLoader.js:417 Invoking error handler due to
Uncaught RuntimeError: memory access out of bounds
I build with this HTTP5 Export / wasm + release + profiling uncompressed build, result:
exception thrown: RuntimeError: memory access out of bounds,RuntimeError: memory access out of bounds
at __ZN13MemoryManager8AllocateEjj10MemLabelId15AllocateOptionsPKci (:wasm-function[1456]:0x82e11)
at __Znwj (:wasm-function[1536]:0x879dc)
at _ZNSt3__214__split_bufferIPK10Il2CppTypeRNS_9allocatorIS3_EEEC2EjjS6 (:wasm-function[12321]:0x40d85a)
at _ZNSt3__26vectorIPK10Il2CppTypeNS_9allocatorIS3_EEE21__push_back_slow_pathIRKS3_EEvOT (:wasm-function[12311]:0x40d58a)
at dynCall_vii (:wasm-function[29427]:0x6b08ff)
at Object.dynCall_vii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:431438)
at invoke_vii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:339947)
at __ZN6il2cpp8metadataL27PopulateArrayGenericMethodsEP11Il2CppClasstRKNSt3__26vectorINS0_18GenericArrayMethodENS3_9allocatorIS5_EEEE (:wasm-function[13592]:0x43242b)
at dynCall_vii (:wasm-function[29427]:0x6b08ff)
at Object.dynCall_vii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:431438)
at invoke_vii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:339947)
at __ZN6il2cpp8metadataL17SetupArrayMethodsEP11Il2CppClass (:wasm-function[13588]:0x43220a)
at __ZN6il2cpp8metadata13ArrayMetadata16SetupArrayVTableEP11Il2CppClassRKNS_2os12FastAutoLockE (:wasm-function[13586]:0x431ad4)
at __ZN6il2cpp2vmL11SetupVTableEP11Il2CppClassRKNS_2os12FastAutoLockE (:wasm-function[12292]:0x40c3c1)
at __ZN6il2cpp2vm18SetupMethodsLockedEP11Il2CppClassRKNS_2os12FastAutoLockE (:wasm-function[12290]:0x40bf2d)
at __ZN6il2cpp2vmL10InitLockedEP11Il2CppClassRKNS_2os12FastAutoLockE (:wasm-function[12288]:0x40bc02)
at dynCall_vii (:wasm-function[29427]:0x6b08ff)
at Object.dynCall_vii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:431438)
at invoke_vii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:339947)
at __ZN6il2cpp2vm5Class4InitEP11Il2CppClass (:wasm-function[12287]:0x40b976)
at __ZN6il2cpp2vm5Class19InitFromCodegenSlowEP11Il2CppClass (:wasm-function[12354]:0x40e92f)
at __ZN6il2cpp2vm13MetadataCache24GetTypeInfoFromTypeIndexEi (:wasm-function[12716]:0x418c3c)
at __ZN6il2cpp2vm13MetadataCache28IntializeMethodMetadataRangeEjjRKNS_5utils13dynamic_arrayI19Il2CppMetadataUsageLj4EEE (:wasm-function[12769]:0x419adb)
at dynCall_viii (:wasm-function[29437]:0x6b09fc)
at Object.dynCall_viii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:432610)
at invoke_viii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:341656)
at __ZN6il2cpp2vm13MetadataCache24InitializeMethodMetadataEj (:wasm-function[12774]:0x419ca5)
at __Z32il2cpp_codegen_initialize_methodj (:wasm-function[12010]:0x4043a5)
at _EqualityComparer_1_CreateComparer_mC194D6144B146CE27C54450303A74F03D88AE6A3_gshared (:wasm-function[28352]:0x685043)
at _Comparer_1_get_Default_m67813FCF3F8ECF21E2EFB60FD0FE8F2C4BB510FD_gshared (:wasm-function[28151]:0x6771d2)
at _Dictionary_2__ctor_m499028E85929789637749F7847C5EA53E99B51A0_gshared (:wasm-function[28281]:0x67e305)
at _Dictionary_2__ctor_m7D745ADE56151C2895459668F4A4242985E526D8_gshared (:wasm-function[28233]:0x67a4d9)
at __Z60Dictionary_2__ctor_m20A5B6C6950ACF998FE28F7FACEA19C755593E62P54Dictionary_2_tD6E204872BA9FD506A0287EF68E285BEB9EC0DFBPK10MethodInfo (:wasm-function[15475]:0x46b891)
at _LocalDataStoreMgr__ctor_m8AB872E90E987DD5268F7484DE1DA726960073EB (:wasm-function[18595]:0x4f4e5a)
at _Context__cctor_mC9A543FDFC2215E0E3560414E453324515CD3B40 (:wasm-function[16183]:0x4973c9)
at _Z66RuntimeInvoker_FalseVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017PFvvEPK10MethodInfoPvPS4 (:wasm-function[26787]:0x653f83)
at dynCall_iiiii (:wasm-function[29353]:0x6b01c8)
at Object.dynCall_iiiii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:422761)
at invoke_iiiii (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:326541)
at __ZN6il2cpp2vm7Runtime6InvokeEPK10MethodInfoPvPS5_PP15Il2CppException (:wasm-function[12818]:0x41b7a0)
at __ZN6il2cpp2vm7Runtime9ClassInitEP11Il2CppClass (:wasm-function[12820]:0x41b95c)
at __ZN6il2cpp2vm6Object16NewAllocSpecificEP11Il2CppClass (:wasm-function[14022]:0x441ae3)
at __ZN6il2cpp2vm6Object3NewEP11Il2CppClass (:wasm-function[14021]:0x441a6e)
at __ZN6il2cpp2vm6Domain11ContextInitEP12Il2CppDomain (:wasm-function[15014]:0x45e27d)
at _ZN6il2cpp2vm7Runtime4InitEPKcS3 (:wasm-function[12793]:0x41ae90)
at _il2cpp_init (:wasm-function[13315]:0x42b59e)
at __Z24InitializeIl2CppFromMainRKN4core12basic_stringIcNS_20StringStorageDefaultIcEEEES5_iPPKcb (:wasm-function[7135]:0x267611)
at __Z15InitWebGLPlayeriPPc (:wasm-function[7058]:0x25f8f4)
at _main (:wasm-function[7057]:0x25f7b3)
at Object._main (blob:http://localhost:8000/67ce5733-11c6-4284-9587-2ac859a55035:2:415283)
So I noticed after writing the reply that numerous other people had replied, anyways here are a couple of more stack traces, not sure if they’re useful or not.
We started getting this and similar errors on two of our applications this week as well. I can also reproduce with the chair demo linked above.
I did a development build of my own app and the crashes/exception seem to come from all over the place and it looks like a new stack trace each time.
The first stack does look like a potential bug. If you can reduce the test case down to minimal reproducible case, that would be much appreciated.
The second looks like an issue with Text Mesh Pro, or an issue with using Text Mesh Pro. Hard to say based on the call stack, though these two crashes look unrelated.
@jukka_j Normally I would agree that the second error is unrelated, except the error started occurring at the same time as the other errors. The TextMeshPro error does not occur in Chrome 85 or lower.
I’ll try this tomorrow, but our Unity build hasn’t changed since before the Chrome update, and ran without issues until then.
I am experiencing exactly the same issue, I think it is a combined affect of Unity/Chrome. This is happening intermittently with various inexplicable errors that aren’t present on any other platform.
I have been seeing the same collection of seemingly random errors for the past two days of debugging, and finding this thread is the first warm feeling I have had since i ran into the problem. Everything was working fine on chrome and now even old builds that were running fine in the past are producing the same errors. The terrifying thing is that I just did a build of an empty scene (with no code or anything running) and the error still occurs. I am not sure how to move forward from here.