Page 1 of 1

Hints on hunting down access violations?

PostPosted: Apr 23, 2003 @ 9:40pm
by fzammetti
I'm in the final phase of getting my game ready for release next week, but I'm still fighting with sporadic access violations (and I think some other types of GPF's, but 005's seem to be the most prevalent).

Can any of you give me any hints on tracking these down? I can tell you that I rarely, if ever, see them in the desktop emulator, but on real devices they are a little more frequent.

Is there anything I can look for in my code specifically that might lead me in the right direction? Any debugging tricks you guys have come up with to help?

I'd appreciate any advice anyone can offer. Thanks all!

PostPosted: Apr 23, 2003 @ 11:04pm
by Digby
Create a release build with debug info, run the game under the debugger with an automated stress test, then when it faults look at the call stack and see what you are attempting to read/write that doesn't belong to your process.

Access violations (0xC0000005) mean that your app is reading/writing to memory that doesn't belong to your process. This usually happens because a pointer value is not initialized properly, you're reading beyond the bounds of a memory object allocated on the heap, or you're continuing to access memory that you've previously freed.

There are tools from Entrek that can tell you when your code does something dumb. There's always Lint and cranking the compiler warnings to level 4 that might catch something.

PostPosted: Apr 23, 2003 @ 11:21pm
by fzammetti

PostPosted: Apr 23, 2003 @ 11:40pm
by RICoder

finding those access violations

PostPosted: Apr 24, 2003 @ 12:18am
by Conan

PostPosted: Apr 24, 2003 @ 1:12am
by Dan East

PostPosted: Apr 24, 2003 @ 1:16am
by fzammetti

PostPosted: Apr 24, 2003 @ 3:15am
by RICoder

PostPosted: Apr 24, 2003 @ 3:52am
by Dan East

PostPosted: Apr 24, 2003 @ 7:48am
by fzammetti

Rational Purify

PostPosted: Apr 24, 2003 @ 11:10am
by jbella

PostPosted: Apr 24, 2003 @ 3:43pm
by Dan East

PostPosted: Apr 24, 2003 @ 4:47pm
by fzammetti