D3D10CreateDeviceAndSwapChain fails in debug mode

Started by
1 comment, last by benp444 11 years, 1 month ago

For a few weeks I have been developing only in release mode. I recently switched back to debug mode and found my previously working code failed. I have narrowed down the issue but have found it is not only present in the code I was working on, but all code (test code, old projects, sample code etc) on my machine.

The problem is that when D3D10CreateDeviceAndSwapChain is called in debug mode I get an E_FAIL error code (see error box attached). I.e. the code below (taken from a Frank Luna sample) fails:


    HR( D3D10CreateDeviceAndSwapChain(
            0,                 //default adapter
            md3dDriverType,
            0,                 // no software device
            D3D10_CREATE_DEVICE_DEBUG,
            D3D10_SDK_VERSION,
            &sd,
            &mSwapChain,
            &md3dDevice) );
 

However if I change the 4th argument to 0 everything works.

I can only think that either my graphics card is broken or the Direct X SDK or Direct X runtime is somehow corrupt. Has anyone got any suggestions as to what should be my next steps?

Ben.

Advertisement

Is your code still working in release builds? Otherwise this might be a related issue to this http://www.gamedev.net/topic/639532-d3d11createdevice-failed/

Yup - thats it.
KB 2670838 has stopped debug mode working. The link you pasted above leads on to a more detailed debate, but my solution was to uninstall this update and now everything works fine.

Going to switch off automatic updates from now on.

Thanks,

Ben.

This topic is closed to new replies.

Advertisement