vulkano-rs/vulkano

Unhandled VulkanError in sync/semaphore.rs causes panic over night

nicolaiunrein opened this issue · 8 comments

When I leave my application running over night and log out of the PC I encounter the following panic in the morning:
image
I am using Vulkano v0.33.0 and tracked down this line as the source of the panic:
https://github.com/vulkano-rs/vulkano/blame/096d3bc6605316c62f75ea5ad5908dd03b2efa4f/vulkano/src/sync/semaphore.rs#L1552
I don't know what causes the error but I think it must have something to do with logging out and/or detaching displays.

Rua commented

The upcoming Vulkano 0.34 release will fix at least the first panic. However, InitializationFailed is an error that is returned by the Vulkan driver itself, and Vulkano doesn't have any way to handle it, other than to pass it on to the user. So the underlying problem lies with your Vulkan driver somewhere.

It's possible that the driver is triggering that error because of something that Vulkano is doing wrong, but that's much harder to determine.

Thanks for the quick reply.I understand that the problem comes from the driver and cannot be handled by the library but wouldn't it be better to pass the error on to the user in this case instead of panicking?

Rua commented

In the case of the second panic, it's not possible to pass it on to the user, because it's inside a drop function.

Let's wait for the v0.34 then and see if it fixes the issue. Thanks again. Feel free to close!

Rua commented

You can use the current work-in-progress version, by using Vulkano from the Github repository here instead of 0.33 from crates.io. Then you can test it already and see if it still has problems. 0.34 has a bunch of breaking changes that you'll probably need to deal with when you switch, but if you deal with it now, you'll be ready for the release anyway.

Rua commented

What's the status on this?

We are still on v0.33.0. But as I said, feel free to close as I think it is resolved as far as I can tell from reading the code. At least what is in the scope of this library