Game won't run DX but computer runs it fine

This is a discussion on Game won't run DX but computer runs it fine within the Game Programming forums, part of the General Programming Boards category; Help! In trying to find answers to my error codes, I stumbled on this forum. I keep getting an error ...

  1. #1
    Registered User
    Join Date
    Nov 2013
    Posts
    4

    Game won't run DX but computer runs it fine

    Help! In trying to find answers to my error codes, I stumbled on this forum.

    I keep getting an error code in a game right at the start, so that it won't run at all--crashes to desktop. The specific line of the code is:

    Exception EDirectXRender with message GR_DXInit()::GR_Direct3D.CreateDevice = -2147024809

    I have worked with the game support and they are stumped as well. My computer more than meets the specs to run the game, it runs DX beautifully, and every DX test turns out great. I've messed with game graphics, resolutions, and a number of other things but can't seem to make any difference--the code is always the same.

    ANY help would be great, especially since the game support says they can't figure it out either (but admit it is probably something in the game iteself).

    I've posted the complete error log below if that helps:
    Start
    Build=2.1.1540 (21 November 2013)
    DXVersion=10.0.0
    Visual C++ 2010 (x86) found
    Visual C++ 2010 (x64) found
    VC 8.0 SP1 (x86) found
    VC 9.0 SP1 (x86) found
    VC 9.0 SP1 ATL (x86) found
    Load MatrixGame.dll .... ok
    Robot.Support()=0
    Operating system=Windows 7 build 6.1.7601 Service Pack 1 [x64]
    Processor=Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz (4 cores)
    CPU Clock=2829 MHz
    Physical Memory Total=8075 MB
    Physical Memory Available=5438 MB
    Page File Total=12073 MB
    Page File Available=9161 MB
    Virtual Memory Total=2047 MB
    Virtual Memory Available=1812 MB
    Updating cfg.txt version ... ok!
    Cache Size=393216 KB
    Loading configuration files.... ok!
    Creating window.... ok!
    Sound interfaces are:
    - Primary Sound Driver
    - Speakers (Conexant 20672 SmartAudio HD)
    Selected interface: 2 channels at 44100 Hz, 16 bit
    Initializing sound.... ok!
    Loading libvorbisfile.dll....ok!
    Pre-fetching music.... ok!
    Initializing DX9.... ok!
    Videocard=NVIDIA NVS 4200M
    Driver=nvumdshim.dll
    Max Texture Size=8192x8192
    Desktop Resolution=1600x900
    Available Resolutions=1024x768, 1280x720, 1280x768, 1280x800, 1360x768, 1366x768, 1440x900, 1600x900
    Exception EDirectXRender with message GR_DXInit()::GR_Direct3D.CreateDevice = -2147024809

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    If you can dig up a copy of d3d9.h (or whatever the correct directx header is), you might be able to at least determine what that error code is.

  3. #3
    Registered User
    Join Date
    Nov 2013
    Posts
    4

    Good advice

    Quote Originally Posted by tabstop View Post
    If you can dig up a copy of d3d9.h (or whatever the correct directx header is), you might be able to at least determine what that error code is.
    Yep, I thought that too. I wasn't able to find that yet, but I have done exhaustive searches for the error codes. The best matches I found were where other people were asking similar questions. I have not yet seen a clear error code explanation though.

    For those who know this coding better than I do, what part of the code is key? Just making sure... I've done searches for the whole thread, just the number at the end, and other variations to see if I could get different results...and found very little.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    The function returning an error code is GR_Direct3D.CreateDevice. Looking at this on MSDN gives a list of possible error return codes, specifically, D3DERR_DEVICELOST, D3DERR_INVALIDCALL, D3DERR_NOTAVAILABLE, D3DERR_OUTOFVIDEOMEMORY. So somewhere in a header those values are #defined. They probably aren't defined in decimal, more's the pity, so it's probably something like 0x80070058 (if I'm doing my conversions correctly, which you shouldn't necessarily trust at this point).

  5. #5
    Registered User
    Join Date
    Nov 2013
    Posts
    4
    Quote Originally Posted by tabstop View Post
    The function returning an error code is GR_Direct3D.CreateDevice. Looking at this on MSDN gives a list of possible error return codes, specifically, D3DERR_DEVICELOST, D3DERR_INVALIDCALL, D3DERR_NOTAVAILABLE, D3DERR_OUTOFVIDEOMEMORY. So somewhere in a header those values are #defined. They probably aren't defined in decimal, more's the pity, so it's probably something like 0x80070058 (if I'm doing my conversions correctly, which you shouldn't necessarily trust at this point).
    This is helpful. So, putting my troubleshooting hat on...if DX tests run fine (and they do), what would cause the game to return DX failures? If a normal DX run finds my devices fine, what would change when a game is trying to run DX?

    One other thought: The game requires at least DX9...but I'm running DX11. I know these are always supposed to be backwards compatible, but could this be what is causing issues?

    I know I'm grasping at straws here, but the "normal" troubleshooting went out the window a few weeks ago.

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by bunyan View Post
    This is helpful. So, putting my troubleshooting hat on...if DX tests run fine (and they do), what would cause the game to return DX failures? If a normal DX run finds my devices fine, what would change when a game is trying to run DX?

    One other thought: The game requires at least DX9...but I'm running DX11. I know these are always supposed to be backwards compatible, but could this be what is causing issues?

    I know I'm grasping at straws here, but the "normal" troubleshooting went out the window a few weeks ago.
    I could imagine just about any of 'em. Out of memory is pretty obvious. Not available if some ill-formed code elsewhere perhaps trashed my handle to the device; same with device lost. I'm not sure under what circumstances you get invalid call, but if the software is trying to do something your hardware can't actually do (because it's maybe misreading a config option) then that's the sort of name I would expect for that.

    TBH I don't know how good the backwards-compatibility of DX11 is.

  7. #7
    Registered User
    Join Date
    Nov 2013
    Posts
    4
    Quote Originally Posted by tabstop View Post
    I could imagine just about any of 'em. Out of memory is pretty obvious. Not available if some ill-formed code elsewhere perhaps trashed my handle to the device; same with device lost. I'm not sure under what circumstances you get invalid call, but if the software is trying to do something your hardware can't actually do (because it's maybe misreading a config option) then that's the sort of name I would expect for that.

    TBH I don't know how good the backwards-compatibility of DX11 is.
    Ok, I know I'm in the minority on this type of error. Others seem to run the game just fine. I've played it on another computer with no crashes whatsoever (but it's not my computer).

    Is it possible to uninstall DX11 and try 9.0C? I'm running Win 7 Pro, 64bit if it matters. I have no idea what this might do to stability in other programs but am willing to give it a shot. I've never UNinstalled DX--only installed or updated. Even if I can uninstall 11, I don't know how to get 9.0C since the general program installs the latest version.

    Hmmm.

  8. #8
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Gasp!!! A forum moderator is about to break the 2 week old post rule.

    The game requires at least DX9...but I'm running DX11.
    Not a problem unless it requires D3DX. The D3DX dll has a ton of versions. Install the DX that comes with the game. It won't install DX over your DX11 but it will install any missing D3DX dlls. That being said failure to create device is not D3DX related. If you are a developer ensure your control panel is set to retail, turn validation off, turn shader debugging off, etc. Make sure you do not have any resource leak checks active. I say the latter b/c I had games that suddenly would not startup. After hours of trying to figure it out I decided to re-install - no, not the games...the OS. Later I realized I had a leak check set on a specific resource ID. Not cool man. Not cool.
    Last edited by VirtualAce; 12-11-2013 at 05:24 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Raspberry Pi totaly freezes, runs fine on ubuntu laptop
    By Libpgeak in forum C Programming
    Replies: 7
    Last Post: 12-13-2012, 09:14 AM
  2. Replies: 17
    Last Post: 03-01-2012, 05:39 AM
  3. Program runs fine, then crashes 5% of the time
    By mat1z in forum C++ Programming
    Replies: 5
    Last Post: 01-30-2011, 04:28 AM
  4. Replies: 5
    Last Post: 08-05-2002, 08:14 PM
  5. Runs fine in IDE but crashes normally!
    By Hunter2 in forum Windows Programming
    Replies: 5
    Last Post: 05-07-2002, 04:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21