Board index » cppbuilder » How can you find what's causing an EAccess violation?

How can you find what's causing an EAccess violation?


2007-05-29 04:01:06 AM
cppbuilder103
When I run my app I sometimes (not always) get a message
Project prog.exe raised exception class EAccessViolation with message
'Access violation at address 005C3363 in module 'prog.exe'. Write of address
0A0E87AC'.
The 'write of address' seems to change. The call stack window just shows
7663B09E C:\Windows\system32\kernel.dll
005C513C System::_16684
76F1100B ntdll.dll
76F10E97 ntdll.dll
and the de{*word*81} doesn't stop on the last source line to be executed. When I
try stepping through the program using the de{*word*81} to find the offending
source line the access violation doesn't happen.
I'm demented. Can anyone give me a pointer as to how to find the cause of
these things. I'm using bcb6 and windows vista business.
 
 

Re:How can you find what's causing an EAccess violation?

"Tom Byars" < XXXX@XXXXX.COM >wrote in message
Quote
When I run my app I sometimes (not always) get a message

Project prog.exe raised exception class EAccessViolation with message
'Access violation at address 005C3363 in module 'prog.exe'. Write of
address 0A0E87AC'.


I'm demented. Can anyone give me a pointer as to how to find the cause of
these things. I'm using bcb6 and windows vista business.
Try madExcept (www.madshi.net/madExceptDescription.htm)
It's not free, but it will help you find the cause of unhandled exceptions.
- Dennis
 

Re:How can you find what's causing an EAccess violation?

Thanks Dennis. I downloaded and installed it but, much as it was all fairly
simple and painless, the report never gave me any information beyond that
same error message. Neat bit of software though.
Code Guard doesn't help with this one either.
"Dennis Jones" < XXXX@XXXXX.COM >wrote in message
Quote

"Tom Byars" < XXXX@XXXXX.COM >wrote in message
news:465b3500$ XXXX@XXXXX.COM ...
>When I run my app I sometimes (not always) get a message
>
>Project prog.exe raised exception class EAccessViolation with message
>'Access violation at address 005C3363 in module 'prog.exe'. Write of
>address 0A0E87AC'.
>
>
>I'm demented. Can anyone give me a pointer as to how to find the cause of
>these things. I'm using bcb6 and windows vista business.

Try madExcept (www.madshi.net/madExceptDescription.htm)

It's not free, but it will help you find the cause of unhandled
exceptions.

- Dennis


 

{smallsort}

Re:How can you find what's causing an EAccess violation?

Some thoughts, questions...
Have you opened the modules window, and tried to see what module could
contain the address 0x005c513c? That might give you a hint of where to
look, or at least where you might set a breakpoint.
Have you tried just starting your program, opening CPU pane, 'G'oing to that
address, and setting a breakpoint there in the CPU pane, and then continuing
the program? (If it's breaking in startup/initialization, you will probably
have to 'Run'/'L'oad Process your executable, and be sure "Execute startup
code on Load" is _not_ checked, step once, and follow prev. instruction.)
If it's a commonly used routine, then you might be able to modify the
(breakpoint) pass count, and try to narrow down when it was actually worth
paying attention to a particular breakpoint instance. It may also be
possible that breaking there (even on a non-failing instance), and stepping
out might help reveal where you are, as you currently don't seem to be
certain of where "System::_16684" is located (I don't know either.)
"Tom Byars" < XXXX@XXXXX.COM >wrote in message
Quote
When I run my app I sometimes (not always) get a message

Project prog.exe raised exception class EAccessViolation with message
'Access violation at address 005C3363 in module 'prog.exe'. Write of
address 0A0E87AC'.

The 'write of address' seems to change. The call stack window just shows

7663B09E C:\Windows\system32\kernel.dll
005C513C System::_16684
76F1100B ntdll.dll
76F10E97 ntdll.dll

and the de{*word*81} doesn't stop on the last source line to be executed. When
I try stepping through the program using the de{*word*81} to find the
offending source line the access violation doesn't happen.

I'm demented. Can anyone give me a pointer as to how to find the cause of
these things. I'm using bcb6 and windows vista business.
 

Re:How can you find what's causing an EAccess violation?

dhoke, thanks for the reply and apologies for taking so long to reply (I had
forgotton all about this thread). That all sounds a bit new to me, but I
will give it a go later.
"dhoke" < XXXX@XXXXX.COM >wrote in message
Quote
Some thoughts, questions...

Have you opened the modules window, and tried to see what module could
contain the address 0x005c513c? That might give you a hint of where to
look, or at least where you might set a breakpoint.

Have you tried just starting your program, opening CPU pane, 'G'oing to
that address, and setting a breakpoint there in the CPU pane, and then
continuing the program? (If it's breaking in startup/initialization, you
will probably have to 'Run'/'L'oad Process your executable, and be sure
"Execute startup code on Load" is _not_ checked, step once, and follow
prev. instruction.) If it's a commonly used routine, then you might be
able to modify the (breakpoint) pass count, and try to narrow down when it
was actually worth paying attention to a particular breakpoint instance.
It may also be possible that breaking there (even on a non-failing
instance), and stepping out might help reveal where you are, as you
currently don't seem to be certain of where "System::_16684" is located (I
don't know either.)

"Tom Byars" < XXXX@XXXXX.COM >wrote in message
news:465b3500$ XXXX@XXXXX.COM ...
>When I run my app I sometimes (not always) get a message
>
>Project prog.exe raised exception class EAccessViolation with message
>'Access violation at address 005C3363 in module 'prog.exe'. Write of
>address 0A0E87AC'.
>
>The 'write of address' seems to change. The call stack window just shows
>
>7663B09E C:\Windows\system32\kernel.dll
>005C513C System::_16684
>76F1100B ntdll.dll
>76F10E97 ntdll.dll
>
>and the de{*word*81} doesn't stop on the last source line to be executed.
>When I try stepping through the program using the de{*word*81} to find the
>offending source line the access violation doesn't happen.
>
>I'm demented. Can anyone give me a pointer as to how to find the cause of
>these things. I'm using bcb6 and windows vista business.