Solved

Exception when project is closing

Posted on 2002-05-01
8
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 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