?
Solved

Exception when project is closing

Posted on 2002-05-01
8
Medium Priority
?
204 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Technology Partners: 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

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…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 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