Connecting Tech Pros Worldwide Help | Site Map

eAccessViolation

Member
 
Join Date: Oct 2007
Posts: 112
#1: Oct 7 '07
im working on making a simple game to brush up my c++ skills as i convert from java...the code i wrote for some reason i keep getting this exception..

unfortunatley i got a little ahead of myself and have a pile of classes and don't know where the problem could be coming from..

---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 0040455B. Write of address 00000001'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------


that is the exception i get...

all i would like to know it what kind of things could create and problem like that and how can i check for the source and hopefully fix the problem..

any help is greatly appreciated

thanks in advance
ken
Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,366
#2: Oct 7 '07

re: eAccessViolation


You have a pointer with an address of 00000001. This is not in your process space.

Fix the pointer.
Member
 
Join Date: Oct 2007
Posts: 112
#3: Oct 8 '07

re: eAccessViolation


how might a pointer end up pointing to that memory location?

thanks
Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,366
#4: Oct 8 '07

re: eAccessViolation


Quote:

Originally Posted by drsmooth

how might a pointer end up pointing to that memory location?

It may have never been initialized. The point is that the address inb the pointer does not point ot a location in your process space. When that occurs, regardless of the value in the pointer, you will get an access violation error.
Member
 
Join Date: Oct 2007
Posts: 112
#5: Oct 8 '07

re: eAccessViolation


ok thanks alot, ill have to comb over my code and check for any undefined variables...


thanks,
ken
Reply