Skip to main content
gamedev.net
🔒 Locked

Crashing Problem

Started by Kiryn 1 reply 750+ views
Original Post
Kiryn
Kiryn
I have this code, that I got from a dx9 tutorial site but reformatted it into oop form in C++. When it starts it crashed with an exception. Access vilation or something at 0x00000005. But when I load it in VSTS it runs perfect. Heres the code http://www.mediafire.com/?amynmnyigxd
Evil Steve
Evil Steve
I'm not able to run the code just now, but if it works in MSVC and not outside, then it's almost certainly a problem with loading resources. When you run your project in MSVC, the current directory is set to your solution directory. When you run the exe alone, the current directory is the directory containing the exe (Usually /Debug/ or /Release/). Make sure you're checking the return value from all your functions, particularly ones which allocate resources, like D3DXCreateTextureFromFile.
blueshogun96
blueshogun96
Using NULL interface pointers will crash your program like a rock. I haven't checked out the source code, but if there's no error checking in it, add some error checking and see what fails.

Topic Locked

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

Sign in to reply to this topic.