Board index » delphi » debugging an access violation

debugging an access violation

Hi there,

    I am running D5.01 on Win 2000 and am getting an access violation when
opening a form from another.  The called form runs through the form create
no problem but somewhere in the delphi source it fails, so what is the best
way to debug it, I have the address, can I get an external de{*word*81}, and or
use the map file?

Any ideas
TIA
Colin B

 

Re:debugging an access violation


Have you tried a memory checker, e.g.

MemProof (http://www.totalqa.com/products/memproof.asp) (freeware)
Sleuth QA (http://www.turbopower.com/products/SleuthQA/) (best, but $)
BoundsChecker (http://www.numega.com/products/aed/del.shtml)

"Colin Basterfield" <col...@areagem.demon.co.uk> schreef in bericht
news:986394272.19027.0.nnrp-14.c1ed1510@news.demon.co.uk...

Quote
> Hi there,

>     I am running D5.01 on Win 2000 and am getting an access violation when
> opening a form from another.  The called form runs through the form create
> no problem but somewhere in the delphi source it fails, so what is the
best
> way to debug it, I have the address, can I get an external de{*word*81}, and
or
> use the map file?

> Any ideas
> TIA
> Colin B

Re:debugging an access violation


Quote
"Colin Basterfield" <col...@areagem.demon.co.uk> wrote in message

news:986394272.19027.0.nnrp-14.c1ed1510@news.demon.co.uk...

Quote
> Hi there,

>     I am running D5.01 on Win 2000 and am getting an access
violation when
> opening a form from another.  The called form runs through the form
create
> no problem but somewhere in the delphi source it fails, so what is
the best
> way to debug it, I have the address, can I get an external de{*word*81},
and or
> use the map file?

No. But what you describe is like something I found the other week, so
I'll just mention it in case it's of any help to you.

When you say "opening one form from another", is the old form being
destroyed? You would use Release for this? That's what I had anyhow.
What I saw was that in the OnCreate method for the new form, if it
popped up a message box which started handling windows messages, the
Released form would disappear from memory, even though its event
handler which started the form swapover had not yet finished. I solved
this by putting the message box into an OnIdle procedure, so it did
not get called until the form was properly dead anyway; I wonder if
there's a better way?

FP

Re:debugging an access violation


Hi there,

MHA:    Many thanks for the input, I will get an evaluation copy and try
them out.
Frank : I will step thro' and make sure that is the case, many thanks

Colin B

Quote
"Colin Basterfield" <col...@areagem.demon.co.uk> wrote in message

news:986394272.19027.0.nnrp-14.c1ed1510@news.demon.co.uk...
Quote
> Hi there,

>     I am running D5.01 on Win 2000 and am getting an access violation when
> opening a form from another.  The called form runs through the form create
> no problem but somewhere in the delphi source it fails, so what is the
best
> way to debug it, I have the address, can I get an external de{*word*81}, and
or
> use the map file?

> Any ideas
> TIA
> Colin B

Other Threads