Advertisement

IDXGISwapChain::Present crashing

Started by May 18, 2018 08:20 AM
4 comments, last by korben_4_leeloo 6 years, 8 months ago

Hi.

I wanted to experiment D3D12 development and decided to run some tutorials: Microsoft DirectX-Graphics-Samples, Braynzar Soft, 3dgep...Whatever sample I run, I've got the same crash.

All the initialization process is going well, no error, return codes ok, but as soon as the Present method is invoked on the swap chain, I'm encountering a crash with the following call stack:

https://drive.google.com/open?id=10pdbqYEeRTZA5E6Jm7U5Dobpn-KE9uOg

The crash is an access violation to a null pointer ( with an offset of 0x80 )

I'm working on a notebook, a toshiba Qosmio x870 with two gpu's: an integrated Intel HD 4000 and a dedicated NVIDIA GTX 670M ( Fermi based ). The HD 4000 is DX11 only and as far as I understand the GTX 670M is DX12 with a feature level 11_0. 

I checked that the good adapter was chosen by the sample, and when the D3D12 device is asked in the sample with a 11_0 FL, it is created with no problem. Same for all the required interfaces ( swap chain, command queue...).

I tried a lot of things to solve the problem or get some info, like forcing the notebook to always use the NVIDIA gpu, disabling the debug layer, asking for a different feature level ( by the way 11_0 is the only one that allows me to create the device, any other FL will fail at device creation )...

I have the latest NVIDIA drivers ( 391.35 ), the latest Windows 10 sdk ( 10.0.17134.0 ) and I'm working under 
Visual Studio 2017 Community.

Thanks to anybody who can help me find the problem...

Do you get a HRESULT back from the present call, or doesn't it come to that point?

(perhaps a code paste to see what you're doing)

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

Advertisement

No the crash occurs before stepping out of Present, so I don't have any HRESULT code, and the debug layer is telling me nothing either. 

If you want to see the code, here it is:

https://github.com/Microsoft/DirectX-Graphics-Samples/blob/master/Samples/Desktop/D3D12HelloWorld/src/HelloWindow/D3D12HelloWindow.cpp

I have similar problems on a dev laptop, where the dx12 debug layer is not installed/configured properly. Try disabling DX12 debug layer:

  • no DXGIGetDebugInterface()
  • no debugController->EnableDebugLayer()
  • no debug flags in CreateDXGIFactory2()

Of course the exact calls to look for may be different in your sources. But maybe this gives you the right idea.

Thanks for your advice. In fact it was the first thing I tried, disabling the debug layer coz I read some people had problems with that.

It was no my case. Since I posted this thread, I found that the problem was introduced with a specific version of the NVIDIA drivers. It's working with 385.69, but starting with 387.92, it's not working anymore. So I don't know what's the problem exactly, but I know it's driver related.

This topic is closed to new replies.

Advertisement