Skip to main content
gamedev.net
🔒 Locked

[SlimDX] Windows 7 + Debug Runtime = Cannot Create Device?

Started by akadajet 8 replies 3.6k views
Original Post
akadajet
akadajet
Hey, I'm using the March SlimDX and sample framework with the 64-bit Windows 7 beta and latest nVidia drivers. I was hoping to move my project development over to Windows 7, but I've hit a snag. When I switch over to the debug DirectX runtime, device creation always fails. This will happen with both the 32-bit and 64-bit versions. This is what shows up in the debug console:

First-chance exception at 0x06741201 in Project1.exe: 0xC0000005: Access violation reading location 0x0000177e.
A first chance exception of type 'System.AccessViolationException' occurred in SlimDX.dll
A first chance exception of type 'SampleFramework.DeviceCreationException' occurred in SampleFramework.dll
An unhandled exception of type 'SampleFramework.DeviceCreationException' occurred in SampleFramework.dll

Additional information: Could not create graphics device.
This exception occurs in the the InitializeDevice() method of the GraphicsDeviceManager class in the sample framework. The COM error code is -532459699. Of course, as soon as I switch back to the retail runtime everything is peachy. I realize that I'm running a beta operating system, so bugs are to be expected. I'm willing to switch back to Vista if nobody knows about this.
Promit
Promit
Maybe the Debug device requires the full DX SDK to be installed?
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Okija
Okija
I'm having the same problem and I have the newest Directx SDK installed.
Promit
Promit
Well, found this at least:
Quote:
To create a device that supports the debug layer, you must install the DirectX SDK (to get D3D10SDKLayers.DLL), and then specify the D3D10_CREATE_DEVICE_DEBUG flag when calling D3D10CreateDevice.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
akadajet
akadajet
I forgot to mention that yes, I have the full March SDK installed (I'm switching runtimes with the control panel tool). I'm also trying to create a dx9 device.

It has worked for me in the past. So unless something changed in the March SDK, I don't know. I don't have Vista or XP installed right now to test it out on another OS.

Edit: I checked the CreateFlags being passed to create the device and don't see anything that mentions a debug device.
Promit
Promit
Well, what I can tell you is this. The exception is an access violation, not a wrapped HRESULT code. DX isn't failing to create the device, it's crashing for some reason. I don't know why this would be exactly, but I will see if I can repro.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
akadajet
akadajet
That was my gut feeling also.

I just tried the MiniTri sample and got the same crash. I'm guessing it's a problem with the beta OS or video drivers.

I'll re-install Vista next week when I have some time.

Thanks for looking into it.
Promit
Promit
Apparently our MiniTri10 sample does already create a debug device (which is a mistake, I think) and runs fine for me. I guess I have to chalk this up to no-repro for the time being. Unfortunately my Windws7 lives in a VM, and so D3D device creation is right out.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
akadajet
akadajet
Are you testing the DirectX 9 sample? I'm not using 10.
Promit
Promit
Oh, no idea then. I use debug 9 devices all the time without incident.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.