Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Access violation reading location 0x00000008 Error

Author
Message
SoulMazer
14
Years of Service
User Offline
Joined: 24th Jul 2010
Location:
Posted: 25th Jul 2010 23:19
Hi, I'm occasionally getting this nasty error when I update the bullets in my FPS-type game. It happens about every tenth time I shoot. I just started getting the error when I started increasing the firing rate of my gun, so I'm pretty sure it is caused by moving the bullets or something with collision.

The full error is as follows:
Quote: "Unhandled exception at 0x0151e94e in (ProjectName).exe: 0xC0000005: Access violation reading location 0x00000008."


So, I have two questions about this. First, is it possible to get a more descriptive error? As in the actual line that is causing the error? Second, obviously, is how can I fix my problem? I'm quite eager to continue working on my game, as I love this library.

Thanks in advance.
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 26th Jul 2010 01:36 Edited at: 26th Jul 2010 01:40
Press F5 to debug your program. When you get the exception, press 'break' to see exactly where the exception was thrown (denoted by a green? arrow). You can also go through the call stack and look at the variables.

Maybe you are going out of bounds while trying to access an array or vector, or maybe you have an invalid pointer.

“C++ : Where friends have access to your private members.”
-Gavin Russell Baker
Nightshade
14
Years of Service
User Offline
Joined: 1st Jul 2010
Location:
Posted: 30th Jul 2010 02:32
im not really experience but i got that error a bunch of times because i was acessing data through a pointer but the pointer was null, if your using pointers make sure they are being assigned there variables properly and that you are accessing the right one... from what i understand this
"Access violation reading location 0x00000008"

refers to a memory address and the address is a really low one, as in 8 bits away from the lowest possible memory address, which is what indicates that its a null pointer issue.
hope this helps.

Login to post a reply

Server time is: 2024-11-19 20:30:45
Your offset time is: 2024-11-19 20:30:45