This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Hints on hunting down access violations?


Hints on hunting down access violations?

Postby fzammetti » Apr 23, 2003 @ 9:40pm

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!
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby Digby » Apr 23, 2003 @ 11:04pm

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.
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Postby fzammetti » Apr 23, 2003 @ 11:21pm

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby RICoder » Apr 23, 2003 @ 11:40pm

<iframe src="http://gamercard.xbox.com/RICoder.card" scrolling="no" frameBorder="0" height="140" width="204">RICoder</iframe>
User avatar
RICoder
FOX News Correspondent
 
Posts: 3948
Joined: Jul 10, 2001 @ 1:48pm
Location: the matrix has me


finding those access violations

Postby Conan » Apr 24, 2003 @ 12:18am

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby Dan East » Apr 24, 2003 @ 1:12am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby fzammetti » Apr 24, 2003 @ 1:16am

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby RICoder » Apr 24, 2003 @ 3:15am

<iframe src="http://gamercard.xbox.com/RICoder.card" scrolling="no" frameBorder="0" height="140" width="204">RICoder</iframe>
User avatar
RICoder
FOX News Correspondent
 
Posts: 3948
Joined: Jul 10, 2001 @ 1:48pm
Location: the matrix has me


Postby Dan East » Apr 24, 2003 @ 3:52am

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby fzammetti » Apr 24, 2003 @ 7:48am

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Rational Purify

Postby jbella » Apr 24, 2003 @ 11:10am

User avatar
jbella
pm Member
 
Posts: 19
Joined: Jun 26, 2002 @ 9:21am
Location: Växjö, Sweden


Postby Dan East » Apr 24, 2003 @ 3:43pm

User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby fzammetti » Apr 24, 2003 @ 4:47pm

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum