The actual address of the exception should help - or where it is raised, cause if you then find the line in error you can see what is happening/what is being accessed.
 
If the address belongs in the just freed DLL, then using the module window, note the base address of the DLL (I normally allocate all my DLL's to different base addresses to avoid DLL relocation on loading - it makes this process simpler). When you load the DLL again, find what code is at this address, at least it will show you the offending code (Will need all your debug options turned on eg stack frames, debug dcus etc)
 
Myles

 -----Original Message-----
From: Phil Middlemiss [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 5 September 2001 2:43 p.m.
To: Multiple recipients of list delphi
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