Skip to main content
gamedev.net
🔒 Locked

debug ddraw programs

Started by Merwin van Dijk Aug 9, 2002 at 5:43 AM 2 replies 550+ views
Original Post
Merwin van Dijk
Merwin van Dijk
I don''t have much experience with the debugging of programs. The most succesful way for me to debug a program is (in vc++ 6) to go inside Winmain and with use of f10 : Step into and f11 : Step over, I can see the value of variable''s. With this I can usually find out what''s wrong in my program. But if direct draw in action is I can''t see the value of variable''s or do anything else. When I installed direct 8.1 I choose for the debug version. How do solve this problem :S
Kooo
Kooo
The debug runtime version doesn''t let you step into the source (you don''t have the source code), but it prints messages to the Debug window in VC++. Click on the Debug tab at the bottom of the screen and see if there are any error message produced. It will tell you exactly what the problem is (assuming it''s a problem with the way you set up DX or the data you are passing to it).
Merwin van Dijk
Merwin van Dijk
If I press f5 (Go), my program starts, and all I see is a black screen. Pressing escape let my program end. Back in vc++. I see no debug tab at the bottom of the screen. If I click on view (top of the screen) --> Output I can find the debug tab beside the ''Build'' and ''Find in files 1'' tabs. If I click on the debug tab I get the following message''s:

Loaded ''ntdll.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\kernel32.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\ddraw.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\msvcrt.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\user32.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\gdi32.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\advapi32.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\rpcrt4.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\dciman32.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\uxtheme.dll'', no matching symbolic information found.
Loaded ''C:\WINDOWS\system32\MSCTF.dll'', no matching symbolic information found.
The thread 0x748 has exited with code -858993460 (0xCCCCCCCC).
The program ''D:\CPP\test bmp\Debug\test bmp.exe'' has exited with code -858993460 (0xCCCCCCCC).

I don''t understand what these message''s mean but I don''t have the idea that they contain information about direct draw. It could be that there is nothing wrong with the direct draw part of code that I wrote but in that case how do I debug the code that''s comes after direct draw is in action?
dommer2029
dommer2029
Debugging full-screen apps is problematic. If you can run your app in a window instead, you''ll be able to access the debugger while it''s running. Otherwise, you''re looking at getting a 2nd PC, networking them together, and learning how to use the remote debugging features of VC++. My first pass-through on a Dx app I opted to go full-screen, because that was my final destination, but I think that was a mistake. The code is very similar, and you should set a boolean to indicate which mode you want, code for both cases, and start out testing your app in windowed mode.

If your windowed version works, but your full-screen one doesn''t, and you can''t set up the 2 machine solution, you need to implement file logging (and flush after each cout/fprintf so that when it crashes you''ve got the latest data ... this will, of course, drive performance through the ground). Logging will let you at least trace where the problem is occurring -- you can do a binary search (adding more log statements each time) until you figure out which line is causing the problem/crash.

Good luck,

--Domenic
Domenic, Underdoghttp://www.unitedunderdogs.com

Topic Locked

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

Sign in to reply to this topic.