Jump to content
  • Advertisement
Sign in to follow this  
ChainChief

CreateDevice () fails

This topic is 3441 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been working on a game for a few months now, and it is near complete. However, just recently I got an acess violation error, which I traced back to the CreateDevice () method of LPDIRECT3D9. The weird thing is, that code is in my Engine, which I have not even tampered with for a long time, since it has always worked fine before. I also tried to get maximum validation from DirectX, but I do not have the control panel app for this. If I remember correctly, this same thing happened a while back when I tried to change the Back buffer width and height, but since I changed the values to W:H, 1024:768, it has worked fine since. How can I pinpoint this problem and resolve it? Jacob

Share this post


Link to post
Share on other sites
Advertisement
The easiest way is to install the DX SDK on the machine, set it to the debug runtime and crank up the debug slider to the 2nd highest setting, then launch the app under a debugger.

Anything else is going to result in a giant game of trial and error.

Share this post


Link to post
Share on other sites
Thanks for the reply, I reinstalled directx and was able to find the utility in Start menu. I set maximum validation, etc. but I didnt get any more information. How do you get DirectX to show the error messages/where do you see this?
Also, I decided to create a new project and run code from a website which I am absolutly positive works with same DX version, compiler, etc. However, I get the same exact problem, CreateDevice () fails. So, that leads me to belive, it is NOT THE CODE that is the problem. So what else could it be?

Share this post


Link to post
Share on other sites
Ok, I got the error messages working:

Direct3D9: :====> ENTER: DLLMAIN(00a3e6e0): Process Attach: 000004d0, tid=00000f74
Direct3D9: :====> EXIT: DLLMAIN(00a3e6e0): Process Attach: 000004d0
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
Direct3D9: (WARN) :****Direct3D DRIVER DISABLING ERROR****:First call to DdQueryDirectDrawObject failed!
Direct3D9: (ERROR) :No hardware acceleration is available in the current mode
Direct3D9: (WARN) :****Direct3D DRIVER DISABLING ERROR****:First call to DdQueryDirectDrawObject failed!
Direct3D9: (ERROR) :No hardware acceleration is available in the current mode
Direct3D9: (ERROR) :No hardware acceleration is available in the current mode
Direct3D9: (ERROR) :No ddraw acceleration is available in the current mode
D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO
Direct3D9: (WARN) :****Direct3D DRIVER DISABLING ERROR****:First call to DdQueryDirectDrawObject failed!
Direct3D9: :====> ENTER: DLLMAIN(00a3e6e0): Process Detach 000004d0, tid=00000f74
Direct3D9: (INFO) :MemFini!
Direct3D9: (WARN) :Memory still allocated! Alloc count = 3
Direct3D9: (WARN) :Current Process (pid) = 000004d0
Direct3D9: (WARN) :Memory Address: 00884fe8 lAllocID=1 dwSize=000047f8, (pid=000004d0)
Direct3D9: (WARN) : Stack Back Trace
Direct3D9: (ERROR) : [0] : Address 00A3E4CB
Direct3D9: (ERROR) : [1] : Address 00A3E59B
Direct3D9: (ERROR) : [2] : Address 00A3E440
Direct3D9: (ERROR) : [3] : Address 00A32DB4
Direct3D9: (ERROR) : [4] : Address 4FDFAF2E
Direct3D9: (ERROR) : [5] : Address 00411715
Direct3D9: (ERROR) : [6] : Address 00411524
Direct3D9: (ERROR) : [7] : Address 00411FE8
Direct3D9: (ERROR) : [8] : Address 00411D4F
Direct3D9: (ERROR) : [9] : Address 7C816FE7
Direct3D9: (ERROR) : [10] : Address 00000000
Direct3D9: (ERROR) : [11] : Address 00000000
Direct3D9: (ERROR) : [12] : Address 00000000
Direct3D9: (ERROR) : [13] : Address 00000000
Direct3D9: (ERROR) : [14] : Address 00000000
Direct3D9: (ERROR) : [15] : Address 00000000
Direct3D9: (WARN) :Memory Address: 0088a258 lAllocID=11 dwSize=000000d8, (pid=000004d0)
Direct3D9: (WARN) : Stack Back Trace
Direct3D9: (ERROR) : [0] : Address 00A352B7
Direct3D9: (ERROR) : [1] : Address 00A3601D
Direct3D9: (ERROR) : [2] : Address 00A365F8
Direct3D9: (ERROR) : [3] : Address 00A32DD5
Direct3D9: (ERROR) : [4] : Address 4FDFAF2E
Direct3D9: (ERROR) : [5] : Address 00411715
Direct3D9: (ERROR) : [6] : Address 00411524
Direct3D9: (ERROR) : [7] : Address 00411FE8
Direct3D9: (ERROR) : [8] : Address 00411D4F
Direct3D9: (ERROR) : [9] : Address 7C816FE7
Direct3D9: (ERROR) : [10] : Address 00000000
Direct3D9: (ERROR) : [11] : Address 00000000
Direct3D9: (ERROR) : [12] : Address 00000000
Direct3D9: (ERROR) : [13] : Address 00000000
Direct3D9: (ERROR) : [14] : Address 00000000
Direct3D9: (ERROR) : [15] : Address 00000000
Direct3D9: (WARN) :Memory Address: 0088a3a0 lAllocID=16 dwSize=00000080, (pid=000004d0)
Direct3D9: (WARN) : Stack Back Trace
Direct3D9: (ERROR) : [0] : Address 00A3679F
Direct3D9: (ERROR) : [1] : Address 00A32DD5
Direct3D9: (ERROR) : [2] : Address 4FDFAF2E
Direct3D9: (ERROR) : [3] : Address 00411715
Direct3D9: (ERROR) : [4] : Address 00411524
Direct3D9: (ERROR) : [5] : Address 00411FE8
Direct3D9: (ERROR) : [6] : Address 00411D4F
Direct3D9: (ERROR) : [7] : Address 7C816FE7
Direct3D9: (ERROR) : [8] : Address 00000000
Direct3D9: (ERROR) : [9] : Address 00000000
Direct3D9: (ERROR) : [10] : Address 00000000
Direct3D9: (ERROR) : [11] : Address 00000000
Direct3D9: (ERROR) : [12] : Address 00000000
Direct3D9: (ERROR) : [13] : Address 00000000
Direct3D9: (ERROR) : [14] : Address 00000000
Direct3D9: (ERROR) : [15] : Address 00000000
Direct3D9: (WARN) :Total Memory Unfreed From Current Process = 18768 bytes
Direct3D9: :====> EXIT: DLLMAIN(00a3e6e0): Process Detach 000004d0


This is just from the simplest program I could make to show that D3D is not working properly. I have no idea what this means.

Share this post


Link to post
Share on other sites
Could be a lot of things, and this is not a comprehensive list:

- If the machine is running Windows Server 2003 I believe it disables GPU accel by default
- desktop is not in a 32 bit mode. Modern GPUs can display this mode but cannot make a compatible rendertarget for it.
- trying to create a d3d in a remote desktop session on anything windows OS older than Vista
- trying to create a device with a display mode lacking an alpha channel (X8 or A8)

Share this post


Link to post
Share on other sites
Run dxdiag and see under the Graphic( or Display, whatever, I'm sorry I only have a Chinese version of that ) tab check if the DirectDraw and Direct3D Acceleration are enabled.

Share this post


Link to post
Share on other sites
Thanks for the replies.
I ran dx diagnostic and was surprised to find that DirectDraw Acceleration/Direct3D Acceleration/ and AGP Texture Acceleration were all Not Available.

After this were the following notes:
The system is using the generic video driver. Please install video driver provided by the hardware manufacturer.
DirectDraw test results: All tests were successful.
Direct3D functionality not available. You should verify that the driver is a final version from the hardware manufacturer.

What should I do at this point?

Share this post


Link to post
Share on other sites
Also, I already had the driver installed, and everything was working fine until now.
I just tried to add the dirver again, and found the two components with a yellow exclamation:
RADEON 9600 PRO SEC Family (Microsoft Corporation)
RADEON 9600 SERIES

When I add these, I get an error: Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)

Is this driver broken / or should I try reinstalling it?
Im not sure if it came with a cd.


Share this post


Link to post
Share on other sites
Ok, after a lot of searching I finally found the Radeon 9600 cd and installed it. No change. I am really getting frusterated now, and will probably buy a new computer. This is, unless there is anything else I can try?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!