I had an app exibiting random crashes. After running memory Sleuth I discovered that my TForm.Free and / Or TForm.Release statements were failing to trigger (app was a similar structure to yours). In the end I Set Action := caFree and called close instead for free, my forms then correctly released.
You may be having a similar problem but if not try running Memory Sleuth (comes with D4) and look for memory leaks. Robert Martin Software Engineer Wild Software Ltd ----- Original Message ----- From: "Max Nilson" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Friday, October 19, 2001 1:25 PM Subject: RE: [DUG]: Debugging Troubles > Stacey asked about a nasty Windows event exception: > > > How do I go about debugging a problem like this? > > The best approach that I can think of, baring the Zen method of just fixing > it 8-), is to do some serious event logging in your code. > > This kind of event being sent to a destroyed handle is very tricky to fix > without knowing the series of events that lead to the event being posted, so > you need to add simple logging to the window destroy event, any event > posting and in the event dispatcher. > > You can probably get this down to just two places in the code if you use > SetWindowsHookEx to add an event hook to catch any events just about to be > dispatched, or do a temporary patch in Forms.pas in the event loop code, and > if you hook the Win32 SendMessage and PostMessage API's to be able to log > when events are sent. Or you can do a brute force approach and just add more > and more logging code (preferabbly IFDEF'd) until you can see the problem. > > If you need any help with the Win32 API interecption, or the > SetWindowsHookEx incantations just ask. > > Cheers, Max, > > > -------------------------------------------------------------------------- - > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/