Hanging Up

Started by
4 comments, last by Jok 20 years, 11 months ago
When starting D3DApp, it suddenly hangs up. But it may run 3 or 2 times before it will hang up. It also hangs up at the shutting down as well. I do clean up carefully. What should i do?
Advertisement
Make sure you delete any resources in the opposite order you created them. Check the bounds that you don''t try to write more than you have allocated. Check pointers that you don''t use pointers that you have released. Always put NULL in a pointer that you don''t use. Here is an example for the render:

//in the application program loop
if(myDxdevice)
{
//do my dx stuff
}

Why is this important? Because when quitting the application the program is not stopping at once. It will still run one or more times before quitting, if you then have released the myDx9device you can see what will happen. Crash galore!

Most of the time when an application hangs it is because the program is either using an invalid pointer or going beyond allocated memory. Remember that using a directx function that needs something from memory might crash because the pointer to some memory is invalid for one reason or another.


____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

No no no no! :)
The problem is that even computer hangs up and i clean every pointer carefully
Use the Debug DX libraries, and in the control panel settings make sure the debug level is at maximum. Then, when your app closes down take a look in the output window to see if DX is reporting any memory leaks.

You mean when you alt+tab to another program?

.lick
I mean that it hangs up when doing nothing.
And my programm works correctly, it is very interesting

This topic is closed to new replies.

Advertisement