Sign in to follow this  
Anoop Chauhan

Error Creating Debug Device

Recommended Posts

I'm getting mad with following error:

Attempted to create a device with the debug layer enabled and the layer is not installed.

everytime I created D3D10 or D3D11 device with debug configuration, this function fails with E_FAIL, It is mind boggling , I ever tried  D3D10_CREATE_DEVICE_DEBUG flag to create dubug layer and I have also tried to enable it using DirectX control panel and it still didnt work. What should I do?

Share this post


Link to post
Share on other sites

The debug layer is not installed by default, you only get it if you install the developer runtime. You normally get the developer runtime though if you install the DirectX SDK or the Windows 8 SDK (Which now contains the DirectX SDK).

 

What OS are you on?

 

See this link: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476881.aspx

 

It states: "Note  For Windows 8, to create a device that supports the debug layer, install the Windows Software Development Kit (SDK) for Windows 8 to get D3D11_1SDKLayers.dll."

 

Are you using a full version of Visual Studio, or an Express version?

 

Maybe you need to download the Windows 8 SDK separately and install that.

 

Thanks

Ben

Share this post


Link to post
Share on other sites

I had this same exact problem, and helped others on gamedev with the same problem. what happened for me was that i installed a new version of directx over an older version, instead of completely uninstalling the older version first. have you recently updated your directx sdk? that might be the problem, and you might want to uninstall it completely and reinstall it again

Share this post


Link to post
Share on other sites

I reinstalled DXSDK but couldn't get it fixed. It's DirectX SDK June 2010 and I'm using Windows 7.
I guess the error is being caused by wrong configuration of VC++ runtimes on my machine. I have manually deleted and updated them
for many times
Any suggestion?  Thanks guys

Share this post


Link to post
Share on other sites

Try following steps :

 

1) Completely uninstall your Visual Studio (which version are you using btw?) and DirectX SDK.

2) Install Visual Studio 2010 first.

3) Then install DirectX SDK. Don't leave out any options while installing, just install the whole piece, even if you will never use some of its features.

4) Revisit your problem and see if you still face the issue.

Share this post


Link to post
Share on other sites

It wont get me anywhere. Uninstalling Visual Studio does not uninstall its all features and VC++ runtimes too then what benefit would I reap doing this? Does it seem to be dependency issue? Anyway I'll give it a try. Thanks
 

Share this post


Link to post
Share on other sites

[quote name='Anoop Chauhan' timestamp='1357289212' post='5017397']
Does it seem to be dependency issue?
[/quote]

It does actually. Also, there is a probability that your project is getting built in release mode, and it's ignoring all the debug level info from d3d.

Just check if that's not the case.

Share this post


Link to post
Share on other sites

Can you check if you have D3D11SDKLayers.dll on your system. On my system I found it in the System32 and SysWOW64 directories, as well as in \Microsoft DirectX SDK (June 2010)\Developer Runtime\x86 and \Microsoft DirectX SDK (June 2010)\Developer Runtime\x64 directories.

 

Also when you run your app use something like SysInternals Process Explorer to see if the D3D11SDKLayers.dll is being loaded.

 

For example, when I run my game in Debug mode I can see from Process Explorer that the DLL is being loaded, and specifically I can see its the one from the SysWOW64 directory:

D3dDebugDLL.JPG

 

Thanks

Ben

Share this post


Link to post
Share on other sites

Another tool to try is Depends.exe and tell it to profile your game. It'll then list all the DLLs loaded (Which tree of which DLLs loaded them).

 

Here is the output on mine:

Depends.jpg

 

Interestingly you can see that D3D11.dll tries to dynamically load D3D11SDKLayers.dll twice. The first time it tries to load if from my games directory, and fails (See the yellow circle with a question mark in it). The second time it loads it successfully from the SysWOW64 directory.

 

Try this with your app and see whether D3D11.dll is even trying to load the layers DLL and if it is where is it looking and failing.

 

Thanks

Ben

Share this post


Link to post
Share on other sites

Yeah Thanks Ben! Dependency Walker makes it clear to understand,
System loads all necessary load time dynamic dependecies to start application.
the actual cause is here
LoadLibraryExW("C:\Windows\system32\DXGIDebug.dll", 0x00000000, 0x00000000) returned NULL. Error: The specified module could not be found (126).
LoadLibraryExW("C:\Windows\system32\D3D11_1SDKLayers.dll", 0x00000000, 0x00000000) returned NULL. Error: The specified module could not be found (126).
 , its run time failure
I couldn't understand why system had tried to load D3d11_1SDKlayers.dll instead of D3D11SDKLayer.dll,

CaptureDepends2.JPGCaptureDepends.JPG

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this