Jump to content
  • Advertisement
Sign in to follow this  
thedustbustr

Unhandled exception at 0x0040362e in katana4.exe: 0xC0000005: Access violation readin

This topic is 5394 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My project builds fine under Debug but when I try to build as release it compiles and links but crashes when run. Unhandled exception at 0x0040362e in katana4.exe: 0xC0000005: Access violation reading location 0xfeedfafa. I've never had a problem like this. I think it has to do with SDL/OGL for video because when I traced the problem back through my builds the build before video works fine. I'm using the fulid studios memory manager - the "0xfeedfafa" shows that some manager or another is messing with my memory, but when I search the source there is no string "fafa". What could cause this? My source is somewhat large and I have no idea what parts are causing this. I recall seeing "stack corruption" at some point during my debugging- what can cause this, and how did I pull it off? In debug build, fluid studios memory manager says I dont have any leaks. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Odds are you are dereferencing an uninitialized pointer: the address 0xfeedfafa is in kernel land.

Share this post


Link to post
Share on other sites
Quote:
Original post by thedustbustr
pointers... the only denotation of vector I know of is std::vector, which has nothing to do with memory management...


std::vector has plenty to do with memory management - namely, it does it for you [grin]

Share this post


Link to post
Share on other sites
I fixed my problem - i was depending on assert in a release build (stray pointers all over the place).

I'm still confused as to how my pointers got initialized to 0xfeedfafa (Kernel land? Maybe, but the humanness is too much of a coincidence for me, especially over and over). Any ideas?

Fruny: What do you mean, std::vector does MM for you? Thats news to me. Can you explain a little or link me to a short explanation?

Much appreciated.
Dustin

Share this post


Link to post
Share on other sites
Quote:
Original post by thedustbustr
I fixed my problem - i was depending on assert in a release build (stray pointers all over the place).


Side effects in assert == Bad Idea™

Quote:
What do you mean, std::vector does MM for you?


A std::vector encapsulates a dynamically allocated array. It takes care of creating, resizing and destroying it as necessary. And it is trivial to get a pointer to the data it contains (&myvec[0]) when you need it to use a C function.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!