renderdoc icon indicating copy to clipboard operation
renderdoc copied to clipboard

Can't view captures due to crash when loading

Open 197g opened this issue 3 years ago • 8 comments

Description

Whenever I try openening a frame capture qrenderdoc crashes with a segfault. It does not happen when capturing the frame or saving the capture to disk, only at the time of opening it. When closing qrenderdoc it seems to open the capture for a short time and this causes it to crash, too.

Steps to reproduce

Load the capture file provided (still looking into uploading it, will comment soon).

Environment

  • QRenderDoc v1.21 (NO_GIT_COMMIT_HASH_DEFINED)
  • Packaged for Arch - https://aur.archlinux.org/packages/renderdoc
  • Graphics API: NVIDIA-SMI 515.65.01 Driver Version: 515.65.01 CUDA Version: 11.7
  • Graphics Card: NVIDIA GeForce GTX 960

197g avatar Sep 21 '22 19:09 197g

Ah, it works as a zip file: crash.zip

197g avatar Sep 21 '22 19:09 197g

Can you please test with an official build or building directly from source on either a stable version or latest code? I do not support distribution-made packages and they're not considered reliable.

baldurk avatar Sep 21 '22 19:09 baldurk

No problem, same issue with QRenderDoc v1.21 (98a93408c6df02502f9e7dbbc35fa234c8da024e)

197g avatar Sep 21 '22 20:09 197g

This crash is caused by your application creating two devices simultaneously, which is not supported. I will look at adding an error return code in this case when the second device is created, but I have no plans to support this use case.

baldurk avatar Sep 22 '22 09:09 baldurk

I'm not aware of creating two parallel devices. Also, why segfault on this. I'd be fine with an error message but Undefined Behavior seems excessive.

197g avatar Sep 22 '22 09:09 197g

Ah, I might have misunderstood. The issue isn't just using two devices simultaneous but even having them requested from the adapter at the same time. Okay, yes, that would be an issue.

197g avatar Sep 22 '22 09:09 197g

I don't know what you mean "requested from the adapter" as that isn't a terminology used in the vulkan API. If you mean enumerating physical devices via vkEnumeratePhysicalDevices, then that's fine to do. I'm saying that you can't call vkCreateDevice and create one device, then call vkCreateDevice again while the first is still alive. It's legal in vulkan but not something RenderDoc supports.

The segfault isn't deliberate, that's what a bug is. As I clearly said in the previous comment I will look at detecting this case and returning an error message instead.

baldurk avatar Sep 22 '22 09:09 baldurk

Perfect, I understand now. vkDestroyDevice must have been called before the second device is created. I've got a library mapping to the underlying Vulkan calls, hence the difference in terminology. Thank you :+1:

197g avatar Sep 22 '22 10:09 197g

Multiple calls to vkCreateDevice will now fail unless previous devices are destroyed, and send a message via debug reporting mechanisms.

baldurk avatar Oct 03 '22 19:10 baldurk