Reputation: 19
I am writing in Visual Studio,a C programm and I get this error: Unhandled exception at 0x77dd3e14 in SciComput.exe: 0xC0000005: Access violation reading location 0xff630018.
Can someone explain to a quite absolute beginner what does this mean?
Upvotes: 1
Views: 385
Reputation: 660128
In addition to the good answer by Eutherpy, I would add that the access violation is usually from trying to read or write NULL, which is location zero. Location 0xff630018 is definitely out of bounds, but also is definitely not zero; something strange is going on here.
Windows reserves the bottom 2GB of virtual address space for the "user" half of your process -- that is, the code you are actually running in the process. The top 2GB, which have addresses from 0x80000000 to 0xffffffff are reserved for the use of the operating system to store data associated with your process. Any attempt to access OS-owned memory from user code will immediately result in an access violation. But why is your program trying to access operating system memory in the first place?
Like I said, something strange is going on here. Likely there is some other memory corruption that is then manifesting in this behaviour; this is likely a symptom of some completely different bug.
These are hard to track down. Good luck!
Upvotes: 4
Reputation: 4571
It means that you are trying to access a segment of memory that doesn't "belong" to your program, i.e. memory you haven't allocated, reserved.
Usually, causes for such errors are attempting to write read-only memory or dereferencing NULL-pointers.
"Unhandled exception" means that you haven't provided a way for the program to handle errors when they occur, so it simply crashes.
Note: You can handle exceptions via try...catch mechanism in C++. http://msdn.microsoft.com/en-us/library/6dekhbbc.aspx C, however, doesn't support this.
Upvotes: 3