Closed lufriem closed 3 months ago
Soo I think
void DescriptorPool::freeDescriptorSet(ref_ptr<DescriptorSet::Implementation> dsi)
is to blame.. what I think happens is
I have moved the scoped_lock section into a local scope to ensure the mutex is released before there is a chance of the DescriptroPool being unreferenced:
https://github.com/vsg-dev/VulkanSceneGraph/commit/0746b3c7e7abee7fba730b8e6bc5099a226082de
Could you try this out?
Yes Debug configuration runs fine with that change :)
I thought about proposing such a change but will this not lead to a possible race condition between the mutex being released and the descriptor pool being destroyed? I guess not because ref_ptr is itself thread-safe? And the mutex is there to protect the DescriptorPool members, not DescriptorSet::Implementation's..
Thanks for testing. The Object::_referenceCount is an atomic so is ref_ptr<> calls to ref() and unref() are thread safe.
Running various of the example applications (vsgCamera, vsgInput, ..) in the Debug configuration, I noticed that they all seem to call abort() on shutdown (if I quit them by closing their window or by pressing ESC). On the command line I get the message
I'm running the Debug configuration, built from the tip of the current 'master' branches, Windows 10 Visual Studio 2022 (17.9.7). Release seem to work/shut down fine
The call stack is super deep, sorry
I hope it's just me maybe building vsg incorrectly or something..