-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Crash after app.update() if WgpuPlugin is enabled #3091
Comments
I dug deeper and it looks like the problem is caused by |
What is the full output? |
Sorry for a stupid question, but how can I provide it? I already used |
I thought you only copied the last couple of lines. My bad. Can you try using a debugger to find where it crashes? You will probably need to directly run the executable instead of using |
Here is stacktrace:
I guess the problem is initializing the render in headless mode, because I am running the project as a test. |
If you want to run it headless, you can try using Line 251 in f4cfcc0
|
Trying it this way. I downloaded VK_ICD_FILENAMES=/mnt/Files/Git/test_bevy_crash/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run cargo test But I have the same error. Then I decided to try to run the same code normally, not as a part of a test: use bevy::prelude::*;
fn main() {
let mut app_builder = App::build();
app_builder.add_plugins(DefaultPlugins);
app_builder.app.update();
} And it also crashes. However, the following works, I see the window: use bevy::prelude::*;
fn main() {
let mut app_builder = App::build();
app_builder.add_plugins(DefaultPlugins);
app_builder.run(); // Changed this line from update() to run()
} So the issue in the code! What am I doing wrong? I know that for game I need to use |
Right, bevy_winit requires it's own runner to be used as it is responsible for creating the actual winit winfow. Bevy's CI uses the winit runner and then stops the test after a fixed amount of time. See #1826 for how it was implemented. |
Got it. Should I keep the issue open? It would be nice to have a better solution. |
I think it is fine to keep it open. Maybe edit the issue title though. |
Thanks, updated the issue. |
No longer an issue with the latest master. I tested and it works. |
Bevy version
0.5
Operating system & version
ArchLinux
What you did
The following code crashes the engine:
But the following works.
What you expected to happen
Exit successfully after single event loop execution.
What actually happened
Additional information
It looks like the issue caused by
WgpuPlugin
.app.update()
is convenient for use inside tests. And some systems need a render to work (like egui, to create UI tests).The text was updated successfully, but these errors were encountered: