Repository: baldurk/renderdoc

Issue #2075: RenderDoc 1.10 crash on D3D11 application startup
Created: 2020-10-14T14:25:49Z
Description
After the update to RenderDoc 1.10 (1.9 works fine) our engine crashes if RendeRoc is attached. It happens right after the windows is created.
Log Output
RDOC 030452: [14:59:04]             core.cpp(1815) - Log     - Adding D3D11 frame capturer for 0x0000024DF1BC0940 / 0x00000000000311B6
RDOC 030452: [14:59:04]     dxgi_wrapped.cpp( 489) - Warning - Querying swapchain buffer for IDXGISurface. This query is ambiguous.
RDOC 030452: [14:59:04]      dxgi_common.cpp(1637) - Warning - Querying ID3D11Device for interface: GUID {fc4f7700-8c88-43fb-aa4f-44c4a584dc19}
RDOC 030452: [14:59:04]      dxgi_common.cpp(1632) - Warning - Querying ID3D11Device for interface: GUID {fc4f7700-8c88-43fb-aa4f-44c4a584dc19}
RDOC 030452: [14:59:05]     dxgi_wrapped.cpp( 489) - Warning - Querying swapchain buffer for IDXGISurface. This query is ambiguous.
RDOC 030452: [14:59:05]      dxgi_common.cpp(1632) - Warning - Querying ID3D11Device for interface: GUID {fc4f7700-8c88-43fb-aa4f-44c4a584dc19}
RDOC 030452: [14:59:05]      dxgi_common.cpp(1632) - Warning - Querying ID3D11Device for interface: GUID {fc4f7700-8c88-43fb-aa4f-44c4a584dc19}
RDOC 030452: [14:59:05]      dxgi_common.cpp(1632) - Warning - Querying ID3D11Device for interface: GUID {fc4f7700-8c88-43fb-aa4f-44c4a584dc19}
RDOC 030452: [14:59:05]   resource_manager.h(1718) - Error   - Invalid state removing resource wrapper - real resource is NULL or doesn't have wrapper
Critical error detected c0000374

Call Stack

ntdll.dll!00007ff936c991b2()
ntdll.dll!00007ff936ca15e2()
ntdll.dll!00007ff936ca18ea()
ntdll.dll!00007ff936caa8a9()
ntdll.dll!00007ff936be080d()
ntdll.dll!00007ff936bdfb91()
ucrtbase.dll!00007ff934ac14cb()
renderdoc.dll!00007ff87e8f5446()
renderdoc.dll!00007ff87e8b743e()
renderdoc.dll!00007ff87e88c3f2()
renderdoc.dll!00007ff87e88e5d0()
renderdoc.dll!00007ff87ec3a8d0()
00007ff8bcc15dff()
00007ff8bcd767c1()
00007ff8bcc1524d()
00007ff8bcc1505a()
System.Windows.Forms.ni.dll!00007ff8d65f7fe3()
System.Windows.Forms.ni.dll!00007ff8d65f44b7()
System.Windows.Forms.ni.dll!00007ff8d65f7a12()
System.Windows.Forms.ni.dll!00007ff8d65e0b70()
System.Windows.Forms.ni.dll!00007ff8d65e0082()
System.Windows.Forms.ni.dll!00007ff8d6d15b12()
clr.dll!00007ff91b13224e()
user32.dll!00007ff935f55c7d()
user32.dll!00007ff935f5584c()
user32.dll!00007ff935f61fe3()
ntdll.dll!00007ff936c3fde4()
win32u.dll!00007ff933b314c4()
System.Windows.Forms.ni.dll!00007ff8d6665b80()
System.Windows.Forms.ni.dll!00007ff8d661dce0()
00007ff8bcc0d9e9()
00007ff8bc0721c1()
00007ff8bc071ec3()
00007ff8bc23cb22()
00007ff8bc07f58d()
00007ff8bc07f0d3()
00007ff8bc07d5f5()
00007ff8bc07d4d8()
00007ff8bc07cd0b()
00007ff8bc07cb90()
00007ff8bc07cb0e()
00007ff8bc07ca44()
00007ff8bc07c9d7()
00007ff8bc44d450()
00007ff8bc44a89e()
System.Windows.Forms.ni.dll!00007ff8d65f03fe()
System.Windows.Forms.ni.dll!00007ff8d65de892()
System.Windows.Forms.ni.dll!00007ff8d65de65b()
System.Windows.Forms.ni.dll!00007ff8d65eefb8()
System.Windows.Forms.ni.dll!00007ff8d65e0a8c()
System.Windows.Forms.ni.dll!00007ff8d65eeed3()
00007ff8bc2451b9()
System.Windows.Forms.ni.dll!00007ff8d65e0082()
System.Windows.Forms.ni.dll!00007ff8d6d15b12()
clr.dll!00007ff91b13224e()
user32.dll!00007ff935f55c7d()
user32.dll!00007ff935f5584c()
user32.dll!00007ff935f61fe3()
ntdll.dll!00007ff936c3fde4()
win32u.dll!00007ff933b31b84()
System.Windows.Forms.ni.dll!00007ff8d66684e5()
System.Windows.Forms.ni.dll!00007ff8d65dd385()
System.Windows.Forms.ni.dll!00007ff8d65ec4c2()
System.Windows.Forms.ni.dll!00007ff8d65f5f0a()
System.Windows.Forms.ni.dll!00007ff8d65f5dc2()
00007ff8bc44a5e3()
00007ff8bc02057a()
00007ff8bbc23f98()
00007ff8bbc23dd1()
clr.dll!00007ff91b136953()
clr.dll!00007ff91b136858()
clr.dll!00007ff91b2b4942()
clr.dll!00007ff91b2b4db5()
mscorlib.ni.dll!00007ff918d6d884()
mscorlib.ni.dll!00007ff918d851f2()
mscorlib.ni.dll!00007ff918e04962()
00007ff8bbbf09b6()
clr.dll!00007ff91b136953()
clr.dll!00007ff91b136858()
clr.dll!00007ff91b137118()
clr.dll!00007ff91b20e1f0()
clr.dll!00007ff91b20ea97()
clr.dll!00007ff91b20e94b()
clr.dll!00007ff91b20e294()
clr.dll!00007ff91b20dfed()
clr.dll!00007ff91b20f1d4()
mscoreei.dll!00007ff920358c01()
mscoree.dll!00007ff92cc1a56c()
kernel32.dll!00007ff9360f7bd4()
ntdll.dll!00007ff936c0ce51()


Steps to reproduce
The engine is closed source, so i can't give a way to reproduce it. But feel free to ask if you have any specific questions.
As soon as I have the time, I'll try to debug it myself. Maybe one of you already has an idea how to approach this or even an "Ahh ... of course!" moment?
Environment

RenderDoc version: v1.10 Win64 381fdbe
Operating System: Windows 10 Pro; Version 1903; Build 18962.1082
Graphics API: D3D11
GPU: GeForce GTX 1080
GPU Driver: 456.55

Duplicate issue #2078: Cannot launch Unreal Engine 4.25 with RenderDoc v1.10
Created: 2020-10-16T00:54:42Z
Description
I am running a project with Unreal Engine 4.25.1 and it crashes when using RenderDoc to launch. It might be related to D3D11 and only happens in version 1.10 so probably the same issue as #2075 . This happens both in a standalone RenderDoc or launching the engine editor directly with RenderDoc Plugin for Unreal enabled.


Steps to reproduce

Launch the Unreal Engine 4.25.1 in RenderDoc and open a project. Then before the project is loaded the crash will happen.
Exception thrown at 0x00007FFB1DDDB589 (renderdoc.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

The call stack is:
renderdoc.dll!WrappedID3D11Device::NewSwapchainBuffer(IUnknown * backbuffer) Line 1436	C++
renderdoc.dll!WrappedIDXGISwapChain4::WrapBuffersAfterResize() Line 373	C++
renderdoc.dll!WrappedIDXGISwapChain4::WrappedIDXGISwapChain4(IDXGISwapChain * real, HWND__ * w, ID3DDevice * device) Line 250	C++
renderdoc.dll!WrappedIDXGIFactory::CreateSwapChainForHwnd(IUnknown * pDevice, HWND__ * hWnd, const DXGI_SWAP_CHAIN_DESC1 * pDesc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC * pFullscreenDesc, IDXGIOutput * pRestrictToOutput, IDXGISwapChain1 * * ppSwapChain) Line 1335	C++




Environment


RenderDoc version: v1.10
Operating System: Windows 10
Graphics API: D3D11
GPU: Geforce RTX 2080 super

Closing comment (2020-10-16T08:25:26Z): This is not the same as #2075 but it is the same as #2055.