Solved

Exception when project is closing

Posted on 2002-05-01
8
194 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

932 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

9 Experts available now in Live!

Get 1:1 Help Now