Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

GPF on closing application.

Posted on 1997-06-16
3
Medium Priority
?
248 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
[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
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
icampbe1 earned 200 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

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

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…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

609 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