The Maximum call stack size exceeded
error will be thrown in a web worker.
#13345
Labels
A-Windowing
Platform-agnostic interface layer to run your app in
C-Bug
An unexpected or incorrect behavior
O-Web
Specific to web (WASM) builds
S-Needs-Investigation
This issue requires detective work to figure out what's going wrong
Bevy version
main
branch[Optional] Relevant system information
macOS 14.4.1, M1 Max, Chrome 124 / Safari Technology Preview
What you did
I used OffscreenCanvas to create a window plugin that allows Bevy to run in a worker.
What went wrong
When running in debug mode within a web worker, if the time interval between frames in the first few frames is less than 1000ms, an 'Maximum call stack size exceeded' error will be thrown:
![截屏2024-05-13 06 28 06](https://private-user-images.githubusercontent.com/1001342/329884415-9c7d7960-b454-415a-a85a-e969312b4ce6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI4MDM3NzIsIm5iZiI6MTcyMjgwMzQ3MiwicGF0aCI6Ii8xMDAxMzQyLzMyOTg4NDQxNS05YzdkNzk2MC1iNDU0LTQxNWEtYTg1YS1lOTY5MzEyYjRjZTYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgwNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MDRUMjAzMTEyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzExOWJiY2FmYWE5MDc3NTcxZTA3OWQ4YzBjZjBmYmI1ZDM1NjBhNzQ4OWQ4NmViMjRlYmNlYTVlMjBmYTFmYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.LysPAUXlwHOf78m-NIVCK8u4jFIuo-730QZjz5a9-s0)
Additional information
Repo: https://github.com/jinleili/bevy-in-web-worker
Can run normally if the time interval in the first few frames is 1000ms: https://jinleili.github.io/bevy_in_web_worker/index.html
The text was updated successfully, but these errors were encountered: