DirectX code runs on my machine, but not another

This is a discussion on DirectX code runs on my machine, but not another within the Game Programming forums, part of the General Programming Boards category; Hard to debug a DirectX game when it runs flawlessly on my machine, but not on another. I even have ...

  1. #1
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598

    DirectX code runs on my machine, but not another

    Hard to debug a DirectX game when it runs flawlessly on my machine, but not on another.

    I even have a logging system that writes to disk all the stages of the init and render code. But it seems that the writing to the disk is so slow that the code terminates before it writes the full error - I'm getting half written error messages.

    Anyone have any ideas on how I can debug this??

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Doesnt VC++ offer a remote debugging facility?......I have never tried to use it though....and I dont know its capabilites

    Found this on an MSDN search....see if it helps

  3. #3
    Registered User Coder's Avatar
    Join Date
    Aug 2001
    Location
    Cairo, Egypt
    Posts
    128
    In general, you have to check HRESULT's returned by DirectX functions whenever failure is possible.

    Use functions like DX8GetErrorString() & DX8GetErrorDescription() ( I think these are the correct function names ) whenever an HRESULT reports failure.

    Display a message box containing the error string & the error description, and bail out.

    By the way, when does it crash on the other PC? ( After/Before device initialization? )
    If it crashes before device intialization then you've got some invalid D3DPRESENT_PARAMETERS member , i.e. you requested something the device does not support.

    Make a debug build with error checking , and test it on the other PC.

    By the way, it's useful to add a "Run in REF" option to all your demos in the testing phase, this helps you identify whether it's a problem with the display adapter or with your code ( if the REF runs, then it's the display adapter )
    Muhammad Haggag

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Porting from 32 bit machine to 64 bit machine!
    By anoopks in forum C Programming
    Replies: 10
    Last Post: 02-25-2005, 08:02 PM
  2. easy question about machine code
    By Jaguar in forum Tech Board
    Replies: 3
    Last Post: 10-07-2003, 10:11 AM
  3. C# Compiled to Machine Code
    By FwyWice in forum C# Programming
    Replies: 1
    Last Post: 12-06-2002, 04:22 AM
  4. Machine code, asm, poop
    By tim545666 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 04-02-2002, 01:27 AM
  5. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM

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