SaschaWillems / Vulkan-glTF-PBR

Physical based rendering with Vulkan using glTF 2.0 models
MIT License
961 stars 130 forks source link

Crash in Model::destroy, vkFreeMemory when unloading specific model #46

Closed voidstorm closed 3 years ago

voidstorm commented 3 years ago

Steps to reproduce:

1.) Load fox model from gltf sample models: https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Fox Note that the model itself works, animations play just fine.

2.) Now load any other model e.g BoomBox - The viewer crashes upon unloading the fox model in line 407 of VulkanglTFModel.cpp -> vkFreeMemory(device, indices.memory, nullptr);

Note that the fox model is the only model I have noticed this behaviour with. Also, I have tested the fox model using the dilligent engine gltf viewer, which they claim is based on your pbr gltf implementation and it works fine there - if this is of any help. https://github.com/DiligentGraphics/DiligentFX/tree/master/GLTF_PBR_Renderer

I haven't looked further into the issue myself, but I thought it might interest you.

SaschaWillems commented 3 years ago

Thanks for the hint. The fox model is one of the very few models that does not have indices, so I expect that's what causing the crash.