-
Notifications
You must be signed in to change notification settings - Fork 438
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
panic in display_plane_supported_displays #2393
Comments
What that code is attempting to do, is figure out which display object belongs with the display handle that was returned from the The fact that it isn't in the cache is quite strange. That means that |
As a way to confirm this, can you run your code with the Vulkan API dump layer enabled (via vkconfig or directly in your program)? Then specifically find the calls to these two functions, and see what they are returning. |
Is there a vulkano call for this? Not able to get the tools onto the platform I am using. |
No, it's part of the Vulkan SDK. |
The BestPractices validation layer is giving this warning:
However I am calling |
It looks like this is a lifetime issue in my code. This code fails:
Using an explicit
I don't know enough about rust or vulkano to understand exactly why this makes a difference, but it does at least prevent the panic. (Unfortunately the |
An API dump of what your program is calling would be very helpful. |
Finally got dump working and have attached the file of a failed run (before the fix I mentioned above). |
Ok, distilling out the important bits, the dump contains this sequence of calls related to displays:
After this point, objects are destroyed and the dump ends, so I assume the crash happens here. It looks like getting |
The code is trying to create a surface on each display, so it looks like the code after I really think this is a resource lifetime issue in my code when I wasn't using |
vulkano: 0.34.1
Calling
display_plane_supported_displays
can cause a panic by callingunwrap
onNone
:This is
physical.rs
lines 921 onwards:The
else
branch is executed whenself.display_properties.get(&display_vk)
returnsNone
but the branch calls it again andunwrap
s it, causing a panic. Presumablyself.display_properties_unchecked()
is supposed to fix this, but it doesn't on my system.I found this as part of a wider problem where none of the values returned by
display_plane_properties
had acurrent_display
that was notNone
. I may not be initialising something properly, but the code should handle this cleanly rather than callingpanic
.The text was updated successfully, but these errors were encountered: