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
Solved

GPF on closing application.

Posted on 1997-06-16
3
218 Views
Last Modified: 2010-04-04
Hi,

I have a D1 app that gives a GPF on closing, but only if there are no children open in the main form.  If there is a child open, it closes no problem.  If I step through the
code, it goes all the way through the FormDestroy event handler, and on exit from there goes to the FormResize event handler.  If I F7 past the END ; of that event handler,
I get the GPF.  The FormDestroy handler writes the INI file, and has a few FREEs. Whatever, disabling the code in these event handlers does not alter the behaviour.

The other curious thing is that it only occurs on 1 of many machines we have.  There is nothing peculiar about this machine.

 
0
Comment
Question by:rossmcm
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
icampbe1 earned 100 total points
ID: 1337088
Your problem is almost always an attempt to free an object that doens't exist.  Make sure that you follow each of the frees with a NIL assignment:  Obj.Free;  Obj := NIL;   Subsequent frees will be OK with this.

Also, I'm not sure I understand the sequence of your comment above.  You destroy the form and then resize it???

Anyhow, do the NIL assignments first.  It is a good practice to follow.  If it still doesn't work, we'll look more closely.

Ian C.

0
 

Author Comment

by:rossmcm
ID: 1337089
Tried assignments to NIL after the frees - no change.  

I don't actually destroy the form and then resize it.  
What I think is happening is that the OnResize event
for the main form is being called 'automatically'
because the form has been destroyed.   Removing the
OnResize handler has no effect.

0
 
LVL 2

Expert Comment

by:icampbe1
ID: 1337090
Thanks for the grade..  Is it fixed?  If not, whats different about the machine that it happens on (how is it different from the ones it works on)?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
indy Tmemory stream non latin charcter issue 2 121
Firemonkey webbrowser scrollbars ? 1 50
Delphi and Access based Enumeration 9 70
Firemonkey DbLookupComboBox equivalent ? 2 55
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
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…

856 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