d3dcoder / d3d12book

Sample code for the book "Introduction to 3D Game Programming with DirectX 12"
1.47k stars 571 forks source link

Mysterious crash when initializing Direct3D, in CreateSwapChain #35

Open rnikander opened 7 months ago

rnikander commented 7 months ago

I was running the sample code fine on an Microsoft Surface. Then I went to my laptop (an ASUS Zenbook), and the programs crash at this line, with an error message I don't understand at all. Any ideas?

This is Chapter 4, Init Direct3D

d3dApp.cpp

ThrowIfFailed(mdxgiFactory->CreateSwapChain(
              mCommandQueue.Get(),
              &sd, 
              mSwapChain.GetAddressOf()));

The error message:

Exception thrown at 0x00007FFAF02AB3A7 (d3d12SDKLayers.dll) in Init Direct3D.exe: 0xC0000005: 
Access violation reading location 0x0000000000000000.