468,512 Members | 1,429 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

Access violation in C++ Borland Builder

5
I am working with Borland C++ builder and got this error message:

Debugger Exception Notification

Project Project1.exe raised exception class EAccessViolation with message 'access violation at address 00404F6A in module 'Project.exe'. Read of address 00000022'. Process stopped. Use Step or Run to continue.

What does it mean and how can I get rid of it?
Sep 4 '06 #1
2 11459
Banfa
9,056 Expert Mod 8TB
I don't know, but most of this type of problem are cause by either trying to dereference a pointer that does not have a good value or by accessing an array index in an array that is larger than the array was defined with.

e.g.

[code]

int array[5];
char *p = (char *)2; // Assuming 2 is an invalid pointer value

*p = 7; // Possible exception invalid deference of a pointer

array[5] = 6; // Out of bounds array access, possible exception
Sep 4 '06 #2
coss
5
I believe it`s not that. To give you a better view what`s going on I`ll explain when it occurs:
My program uses shortest path algorithm, for example it seeks for a shortest way between 2 cities. When cities are close to each other, it works fine. But when I enter cities with a bigger distance between them, this error occurs. In my opinion program cannot allocate enough memory for more complicated operation. I`m a very beginner of C++, that`s why I`m not sure if I am right. Is there any way I could fix it?
Sep 5 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

11 posts views Thread by TGF | last post: by
49 posts views Thread by Relaxin | last post: by
15 posts views Thread by Chris | last post: by
24 posts views Thread by serdar | last post: by
reply views Thread by Xproblem | last post: by
22 posts views Thread by smartwolf agassi via DotNetMonster.com | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.