Advertisement Jump to content

DX12 IDXGISwapChain::Present crashing

Recommended Posts


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:

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...

Edited by korben_4_leeloo

Share this post

Link to post
Share on other sites

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)

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!