Skip to content
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 on startup due to failure to get a DeviceDescriptor #16463

Open
MarcoMeijer opened this issue Nov 21, 2024 · 4 comments
Open

Crash on startup due to failure to get a DeviceDescriptor #16463

MarcoMeijer opened this issue Nov 21, 2024 · 4 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Startup A crash that occurs when first attempting to run a Bevy app P-Crash A sudden unexpected crash S-Needs-Design This issue requires design work to think about how it would best be accomplished

Comments

@MarcoMeijer
Copy link
Contributor

Bevy version

Bevy 0.15-rc.3

Relevant system information

Image
Image

What you did

Made a very simple bevy app (spawn a sprite and press f to toggle fullscreen).

What went wrong

Bevy crashed immediately on the computer of a play tester. It didn't crash on 0.14.2. Also it works normally on my pc (also windows 10, and I send the .exe to the playtester).

Additional information

It crashes on line 363 in the file bevy_render/src/renderer/mod.rs.
This is the line that crashes:

    let (device, queue) = adapter
        .request_device(
            &wgpu::DeviceDescriptor {
                label: options.device_label.as_ref().map(AsRef::as_ref),
                required_features: features,
                required_limits: limits,
                memory_hints: options.memory_hints.clone(),
            },
            options.trace_path.as_deref(),
        )
        .await
        .unwrap();
@MarcoMeijer MarcoMeijer added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Nov 21, 2024
@rparrett
Copy link
Contributor

rparrett commented Nov 21, 2024

Based on the logged system info, their drivers seem ancient (circa 2016).

I am not sure what Bevy's expected support for hardware that old is (see #14078, there's no official policy), but I would recommend that the user try updating their drivers if possible.

@BenjaminBrienen
Copy link
Contributor

I think the general attitude is that we leave these issues open because someone who cares could decide to work on this, but this isn't a priority for bevy maintainers.

Maybe an acceptable, generalized solution would be to not unwrap() results like this? It's not outlandish for an error to be returned, so our function should handle that case.

@BenjaminBrienen BenjaminBrienen added A-Rendering Drawing game state to the screen S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Straightforward Simple bug fixes and API improvements, docs, test and examples and removed S-Needs-Triage This issue needs to be labelled labels Nov 21, 2024
@valaphee
Copy link
Contributor

valaphee commented Nov 22, 2024

You/your play-tester could try the wgpu examples (https://github.com/gfx-rs/wgpu/tree/trunk/examples), and eventually open an issue there, because it should generally work, and not result in a lost device error. (especially when Desktop GL is used)

@alice-i-cecile
Copy link
Member

alice-i-cecile commented Nov 22, 2024

I don't know if we can do any better than "file a warning that explicitly says to update your graphics drivers". If we can't get a render device, we can't run a graphical application / game.

That said, maybe wgpu should handle these older devices / drivers more gracefully?

@alice-i-cecile alice-i-cecile changed the title Crash on startup windows 10 Crash on startup due to failure to get a DeviceDescriptor Nov 22, 2024
@alice-i-cecile alice-i-cecile added S-Needs-Design This issue requires design work to think about how it would best be accomplished P-Crash A sudden unexpected crash C-Startup A crash that occurs when first attempting to run a Bevy app and removed S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Startup A crash that occurs when first attempting to run a Bevy app P-Crash A sudden unexpected crash S-Needs-Design This issue requires design work to think about how it would best be accomplished
Projects
None yet
Development

No branches or pull requests

5 participants