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
- Calculating time durations in RenderDoc with DX12 causes 'Device Lost error' popup
- Reorderable ListView inside a ScrollView has a glitchy behavior when trying to reorder items
- Hidden method is opened in IDE when double clicking the log message in the Console that has the HideInCallstackAttribute
- Errors in the Console when creating a new "2D Platformer Microgame" template project
- Prefab Override popup displays on wrong monitor when Inspector width is resized to minimum
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.