VS.NET debug mode error and release timer problem.

Started by
6 comments, last by Goosey 20 years, 1 month ago
Hello there, first time posting my problems here. Hopefully someone can help Before anything else I am coding a DirectX based project (using only the old DirectDraw API commands; 2D only) in C++ with VisualStudio.NET First of all I have a project that runs perfectly (as far as I can tell) in ''debug build mode'', but when I EXIT the program it gives me this error message: Any one have any suggestions for possibly fixing this? Since it occured after the program exits I figures it was a garbage-collection issue.. but I have scoured my code which is entirely Object-Oriented and it should be collecting all the garbage in the main.cpp''s exit structure and each object''s individual destructor.. :\ The next question is that when I compile this same project in ''Release Build Mode'' it runs without any error message, but it runs SUPER FAST. It is like the timer is going off the hook, and I am using a timer. I am using the timeGetTime() function from windows.h to create my timer function. I am open to suggestions for either of these problems. Thanks in advance. AIM: DarkGoosey ICQ: 14128911 MSN: DarkGoosey@hotmail.com Email: td1@sssnet.com
http://www.goosey.orgAIM: DarkGoosey ICQ: 14128911 MSN: DarkGoosey@hotmail.com Email: Goosey@gmail.com
Advertisement
I haven''t seen such errors in a while but from the look of the assertion I would guess that you''re trying to free some memory you haven''t allocated. Possibly caused by an invalid pointer. Do you set your ponters to NULL after you use them? Just a guess.
Your program is deleteing memory that's already been deleted, or it's delete[]ing memory that should be deleted (or vice versa). Debug the app and find out what line it's failing on in your code. (you'll have to step down through the stack trace, of course.)

EDIT: btw, a word of advice: learn to use the debugger. It is an immensely important tool for programming, and will save you hours of frustration.

"Sneftel is correct, if rather vulgar." --Flarelocke

[edited by - sneftel on March 5, 2004 2:39:39 AM]
quote:EDIT: btw, a word of advice: learn to use the debugger. It is an immensely important tool for programming, and will save you hours of frustration.


I have no clue how to use the debugger I am afraid Infact my instructor told us that it is impossible to use the dubugger when your using fullscreen directX. Is this so? I would love to learn to use it if it is gonna save me frustrations.

thanks for the advice on what might be causing the error though.

Any clue as to why the release build is going so freaking fast?
http://www.goosey.orgAIM: DarkGoosey ICQ: 14128911 MSN: DarkGoosey@hotmail.com Email: Goosey@gmail.com
You can actually run the debugger from a different computer when you''re doing fullscreen DirectX, controlling the app over the networl. In this case, tho, it''s overkill; fullscreen mode is exited to display the error message, and you can jump into the debugger then.

Definitely learn to use it.

"Sneftel is correct, if rather vulgar." --Flarelocke
For debugging Direct3D apps, I use a secondary screen... If your videcard supports it and you have an old monitor screen there, give it a try.



---
"To Iterate is human, To Recurse Divine..."
---"To Iterate is human, To Recurse Divine..."
anyone know any good tutorials on using the debugger or should I just dig through the VS.NET documentation/MSDN
http://www.goosey.orgAIM: DarkGoosey ICQ: 14128911 MSN: DarkGoosey@hotmail.com Email: Goosey@gmail.com
You should be able to debug DX fullscreen apps under NT/2k/XP without any problem or use a dual monitor setup like some have suggested, or make your program work in windowed mode.

This topic is closed to new replies.

Advertisement