This may help ... (grabbing at straws)
 
There is what I regard as a bug in the VCL (D3/D4/D5/D6) when a Form is destroyed, in that not all components on the form are notified of a Forms/Components destruction - the issue is in TComponent.DestroyComponents; ,so perhaps if you are relying on "opremove" notifications, you may be coming unstuck.  This only applies to intraform references (interform is okay, as if csFreeNotification is in the componentstate, then the opremove notification takes place correctly).
 
The behaviour is not the same when a form is destroyed versus if you manually Free a component. If you Free a component (outside of the forms destructor) , then notifications do occur, but if you let the form (Ie create with a Form owner) destroy the component, then bad luck. This is inconsistent behaviour which has tripped me up several times.
 
Myles.
 
-----Original Message-----
From: Robert Martin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 5 September 2001 3:52 p.m.
To: Multiple recipients of list delphi
Subject: Re: [DUG]: DLLs

We pass strings but also use ShareMem so I dont think that is the problem.  I definately think it is related to the freeing of items but due to its infrequency I sustpect it is more a timing issue... form still freeing when dll is cloising?  We are using modal forms with Action = caFree could that be the problem?
 
 
Robert Martin
Software Engineer
Wild Software Ltd
----- Original Message -----
Sent: Wednesday, September 05, 2001 2:42 PM
Subject: Re: [DUG]: DLLs

This kind of exception is horrible. I've had it a couple of times, in different circumstances, so while I can't comment on your exact situation maybe I can at least point you in the right direction.
 
When this has happened to me, it usually boils down to something being accessed that has already been freed. For example, a form that was created with Application.CreateForm was freed manually elsewhere and then the app raised an exception when it exited. Perhaps you have code that is trying to reference the form after it is freed? Alternatively, this type of error also manifests sometimes if you are passing strings back and forth with the DLL and you don't have sharemem as the first unit in the uses clause.
 
Maybe helpful, maybe not.
 
Phil.
----- Original Message -----
Sent: Friday, August 31, 2001 2:23 PM
Subject: [DUG]: DLLs

We have a situation where sometimes (intermittantly) our app crashes after closing a form opened from a DLL.  I have traced the code to the FreeLibrary call which is within a try .. except but the exceptoin is not fireing.  I can step through and see the app call FreeLibrary but once I exit the procedure (containing the freeLibrary) the exception occurs.
 
Any ideas or suggestions would be appreciated.
 
 
Robert Martin
Software Engineer
Wild Software Ltd

Reply via email to