-
Notifications
You must be signed in to change notification settings - Fork 130
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
Segmentation fault when failed to load a texture. #37
Comments
Thanks for reporting this. I'll take a look into this. |
As with my Vulkan samples, I'll replace gli with libktx. This gives more control over how to handle texture loading failures. What would be your favorite way of handling texture loading failures? Right now the ktx loading will also just assert, and I think showing some kind of message or gracefully exiting with a proper output would be sufficient. |
Awesome!
Less assertion as much as possible(so we may better to check if a texture file exists before libktx API call). Simply print an error when failed to load a texture(and/or file not found), then exit an app is appreciated. |
https://github.com/SaschaWillems/Vulkan-glTF-PBR/blob/master/base/VulkanTexture.hpp#L89
Creating
gli::texture2d
orgli::texture_cube
directly fromgli::load
triggers assertion(debug build) or gives undefined behaviour(usually this results to a Vulkan error) in the constructor when failed to load a texture file.(It does not create empty gli texture)
Here is an example when failed to load a texture.
Tthis is an issue of gli, so it should be fixed in gli library. For a while, we can use the following workaround:
Related to: https://github.com/g-truc/gli/issues/174
The text was updated successfully, but these errors were encountered: