Setting the wgpu::RenderPassDescriptor lable to Some("Render Pass") results in error code 0xc000041d
Description I get the following error when I run the tutorial2-surface binary crate from https://github.com/sotrh/learn-wgpu.
error: process didn't exit successfully: target\debug\tutorial2-surface.exe (exit code: 0xc000041d)
Repro steps
git clone https://github.com/sotrh/learn-wgpu
cd .\learn-wgpu-code\beginner\tutorial2-surface
cargo run --bin tutorial2-surface
Expected vs observed behavior From the tutorial I should get a window with a blue background. Instead the window opens with a white background. After a few seconds the window closes and I get the error message above logged to the terminal.
Extra materials I got the following call stack from the Visual Studio 2019 Pro debugger. tutorial2-surface-call-stack.txt .
Platform Windows 10 Pro 21H1 wgpu v0.11.0 AdapterInfo { name: "Intel(R) UHD Graphics 630", vendor: 32902, device: 16027, device_type: IntegratedGpu, backend: Vulkan } Driver Version 24.20.100.6287 which appears to be Vulkan version 1.1.82
In talking with the Game Development with Rust discord community. I found a workaround by setting the following like to label: None, https://github.com/sotrh/learn-wgpu/blob/19ee4aa659df8a729c20f4c58595071a12353e0a/code/beginner/tutorial2-surface/src/main.rs#L95
This allows the code to run without error
Thank you for filing! It would help to see the call stack from this, although whoever investigates this can grab the call stack if it's reproducible.
There's a callstack attached to the OP, the issue is the function is null and the invocation of the debug span function pointer is segfaulting. (I helped investigate this on Discord, just forgot to post this context) Assuming our feature detection code is right, why would Intel lie about having the extension just to return nullptr. For context this is an older Intel driver, so it may do funky stuff.
Silly me, missed the call stack. Thanks for pointing this out! Filed https://github.com/MaikKlein/ash/issues/484 upstream to see where the fix should live. Also added to https://github.com/gfx-rs/wgpu/wiki/Known-Driver-Issues
@cwfitzgerald looks like this function can't be null - https://github.com/MaikKlein/ash/issues/484#issuecomment-950041635t
Is the 0xc000041d error-code perhaps coming from the driver, and the stacktrace perhaps missing a couple frames? Afaik a segfault on Windows is an access violation with error code 0xc0000005 instead.
The last stackframe points right at the return address of cmd_begin_debug_utils_label_ext: https://github.com/MaikKlein/ash/blob/0.33.3/ash/src/vk/extensions.rs#L10134.
Interesting! The return can fail if the stack got corrupted. So perhaps the driver doesn't like something about the string we provided? Ideally, somebody could step through the function assembly to see how it walks our data, and sees if something is off.
@kvark We probably need a minidump to take a better look.