Solved

Exception when project is closing

Posted on 2002-05-01
8
193 Views
Last Modified: 2012-05-04
Hi all!

I have a situation when one of my project raises AV at 00000000 address exception on closing time (I got it running under IDE). It has forms inheritance and some of componets I wrote recently.

First time I thought the problem lays in components. But Delphi or test project could be closed whithout exceptions, even if I used those components on form.

I also thought it could be related to form inheritance, but simple test project with form inheritance does fine.

Now I haven't any ideas. Do anybody have similar problems?
Any explanation will be greatly appreciated!

Mike
0
Comment
Question by:MikeEvteev
8 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6983820
seems there will something freed, which is already freed

only guessing, rare info
0
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 6984278
-or you try to free a object, which not have been created yet !!
The address 00000000 indicates that no address has been assigned to the var.
0
 
LVL 20

Expert Comment

by:Madshi
ID: 6984360
Please post the full exception message here together with the line of code where it happens. Looks, such exceptions can be "access violation at 00000000 reading from 12345678" or it can be "access violation at 12345678 reading from 00000000". That's quite a difference...

Regards, Madshi.
0
 

Author Comment

by:MikeEvteev
ID: 6984448
Exception is:
... exception class C000005 with message "access violation at 0x00000000 read address 0x00000000"

I can't provide source code becouse I cant find wehere it's happens. "Go to code" command opens CPU window.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 20

Expert Comment

by:Madshi
ID: 6984564
You can step through your code in the debugger by pressing F7/F8. This way you should be able to find the guilty line - with a bit of patience at least.

Alternatively you might want to try my package madExcept (free for non-commercial purpose, and free for commercial purpose on your development PC only). This package allows you to find the line which was responsible for the access violation.

http://help.madshi.net/Data/madExcept.htm

The exception you have means that for some reason Delphi jumped to address 0. Could e.g. be a function variable that is set to 0.

Regards, Madshi.
0
 

Author Comment

by:MikeEvteev
ID: 6984892
Hi Mathias!

I've downloaded madExcept. Should It be registered before I could get it to work?

I don't know could be it in help, becouse when I run application outside IDE, nothing happens. No exceptions popups. This happens only in IDE.
0
 
LVL 20

Assisted Solution

by:Madshi
Madshi earned 20 total points
ID: 6985306
You don't need to register. Registering is only necessary, if you want to use the light version on other PCs than your development PC, which is possible only for non-commercial purpose, anyway...

If the exception happens inside of the IDE, you can wait for the exception box, then press F9 to let the program continue. In this moment madExcept should come into action and show you the exception stack. However, if the exception occurs inside of the IDE, you might also wait for the exception box, then look at the call stack in the debug menu. Don't know, perhaps it also contains the valid call stack. Look where the code came from before the exception was raised...

Regards, Madshi.
0
 
LVL 9

Accepted Solution

by:
ITugay earned 30 total points
ID: 6985510
Hi MikeEvteev,

hi all,

may be it will be usefull, just a guess. Use TForm.Release instead of TForm.Free.

------
Igor
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now