recognizing the problem by the code given in'unhandled exception'

Hi.when i run my program it complain about unhandeled exception and give me: unhandeled exception at... In... Exe: access violation reading location... ( by... I mean some numbers,codes,that i dont knoqw what they means)
I have searched alot and all i can find is solving particular problems in all forums.
I have noticed that you( that can problem mine too,if i put it here) are takeing some information about the reason of that exception from that numbers.
I know about what is access violation but i want to understand that code to solve it myself.
Please refrence me to an article or explain them.
P.s. Sorry about my weak english writing.
for an unhandled exception, when you are debugging you can usually break and look at the call stack. The go back up the callstack until you find your code.
what ide/compiler do you use?

is your code large?
Vs2010
Yes.
After breaking,the yellow arrow is beside the decleration of a function which i guess in its call in another class the error occured.
I want to learn the right strategy to solve these errors..
Bcz i guess there should be more.
Atleast,like :
check these things.
These are main, common,reasons.
:/
Access biolation means that you tried to access memory you do not own. Usually it is caused by improper dynamic memory handling.
If memory location is 0 or somethinng close (like 0x5), then you are trying to dereference null pointer. If it is something funny (like 0xDEADCODE) of close (0xDEADCO**), you are in debug mode and using an uninitialized pointer.
If it is completely randon it is either uninitialized pointer, or you tried to use memory after deallocation.
Last edited on
Can u plz explain these three numbers:
Unhandled exception at
0*012d10d6
0*C00000005:
Access violation reading location 0*baadf00d
0*012d10d6 ← position of instruction causing this error in executable.
0*C00000005 ← access wiolation error code (program tried to access memory it does not own)
0*baadf00d ← "catch" value for uninitialized variables. You tried to dereference pointer which was not assigned proper value before.
Take a look here:

http://en.wikipedia.org/wiki/Magic_number_%28programming%29

Search for baadf00d
Topic archived. No new replies allowed.