Search Issue Tracker
Feature Request
Votes
0
Found in
2022.3.6f1
Issue ID
UUM-44809
Regression
No
"RuntimeError: memory access out of bounds" errors are thrown when running WebGL threadsSupport with WebGLExceptionSupport.FullWithStacktrace
How to reproduce:
1. Open the “IN-49411_repro.zip“ project
2. Navigate to File → Build Settings
3. Select WebGL and press Build
4. Open Command Prompt
5. Enter {{cd C:\Users\username\(address of the build)}}
6. Enter {{python ../simple_cors_http_server.py}}
7. Open [http://localhost:8080/|http://localhost:8080/] in Chrome
Expected result: No errors are seen in the browser console
Actual result: Errors are seen in the browser console
Reproducible with: 2022.3.6f1, 2023.1.6f1
Could not test with: 2021.3.29f1 (can not set initial memory), 2023.2.0b3 (build fails)
Fixed in: 2023.1.7f1
Reproducible on: Windows 10
Error:
RuntimeError: memory access out of bounds
at http://localhost:8080/Build/build.wasm.gz:wasm-function[22262]:0xd096be
at http://localhost:8080/Build/build.wasm.gz:wasm-function[40408]:0x15cd3d8
at invoke_iiiiiiiii (http://localhost:8080/Build/build.framework.js.gz:10:396379)
at http://localhost:8080/Build/build.wasm.gz:wasm-function[22399]:0xd20280
at http://localhost:8080/Build/build.wasm.gz:wasm-function[40394]:0x15cd28a
Workaround: Increasing initialMemorySize seems to avoid the error until new memory needs to be allocated
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on DynamicHeapAllocator::CreateTLSFBlock when opening a specific project
- Scene flickers when using Mesh Output with SpriteLit Shader in 2D project
- “Cache Management” text is misaligned in Preferences > Package Manager
- [macOS] network permission shows the name of previously closed app when different app requests network access
- Delta value returned by mouse movementsMonitor is different when changing Screen Resolution
Resolution Note:
This particular issue was due to a package which contained Emscripten-compiled C/C++ code that was incorporated into the project.
When adding code that's already built with Emscripten, the version of Emscripten used needs to match that used by the version of Unity. And if certain player settings are used, for example using native multithreading or WASM 2023 features, then the corresponding compiler/linker flags need to be used with building with Emscripten outside of Unity.
In this case, the developer of the package provided an update to fix the issue.