Solved

GPF on closing application.

Posted on 1997-06-16
3
193 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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