-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome or Edge (Webkit) Out of Memory (oom) crash within seconds of WASM bevy builds #4329
Comments
For wasm, I would recommend building either with Does it work with the commands from the readme? Lines 398 to 399 in 28ba87e
It has been updated in main but not yet for the other branches |
Thanks for the quick response. I'm using portable VSCode on Windows 10 with the codelldb plugin on the autogenerated launch.json, but modified to include wasm target and added the {
"type": "lldb",
"request": "launch",
"name": "Run WASM example 'text_debug'",
"cargo": {
"args": [
"build",
"--example=text_debug",
"--package=bevy",
"--release",
"--target=wasm32-unknown-unknown"
],
"filter": {
"name": "sprite",
"kind": "example"
}
},
"program": "cmd.exe",
"args": ["/s", "/c", "echo Starting wasm-bindgen... ${cargo:program} && wasm-bindgen --out-name wasm_example --out-dir examples/wasm/target --target web ${cargo:program} && echo Starting basic http server with wmic to prevent vscode terminal blocking on child process... && >nul wmic process call create 'cmd /c basic-http-server -a 0.0.0.0:4000 examples/wasm','%cd%'"],
"cwd": "${workspaceFolder}"
} edit: changed
I think further explanations from the unofficial bevy cheatbook: https://bevy-cheatbook.github.io/pitfalls/performance.html |
Observed the same behavior as described in #3867 where it didn't crash in debug builds (with no explicit optimization levels) if i had the dev tools open. |
Hi everyone, I am running into a similar issue as well. Bevy version0.6.0 Operating system & versionUbuntu 20.04 What you did
What you expected to happenThe game not to crash on the browser What actually happenedExactly as described by @JCBuck . It would launch and render for a few seconds, while being very stuttery then the tab would crash from and out of memory error. Additional information
|
Bevy version
Tested with
Main
branch with commitab83336f
along withrelease-0.6.1
@6acf932c
Operating system & version
Windows 10 21H2
Chrome 98.0.4758.102 (Official Build) (64-bit)
What you did
Essentially followed the
WASM
section of theexamples
readme.I used these commands to build the
text_debug
example, without the--no-default-features
flag, or else it wouldn't build. Modifiedindex.html
to point towasm_example.js
after building. Launched withbasic-http-server examples/wasm
What you expected to happen
Expected The text_debug example to launch and render in the browser.
What actually happened
It would launch and render for a few seconds, while being very stuttery then the tab would crash from and out of memory error.
Additional information
It would happen with any of the example projects.
Came across this reddit post describing this workaround which I tested working:
set in
Cargo.toml
Creating this issue since I didn't see one yet as requested in
https://www.reddit.com/r/rust/comments/s06vx3/how_to_get_a_developerfriendly_workflow_with_bevy/hs0228d/
The text was updated successfully, but these errors were encountered: