Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Error Recovery    [ Add a report in this area ]  
Report #:  15944   Status: Closed
Application Hangs-up in FreeLibrary(DllHandle) - 2005 Architect Trial
Project:  Delphi Build #:  9.0.1761.24408
Version:    9.0 Submitted By:   joni angeles
Report Type:  Minor failure / Design problem Date Reported:  9/14/2005 12:21:46 AM
Severity:    Infrequently encountered problem Last Updated: 9/14/2005 3:52:25 AM
Platform:    All versions Internal Tracking #:  
Resolution: Test Case Error (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
1.00 out of 5
Total Votes: None
Description
I'm testing the 30-day trial version of Delphi 2005.  I'm having problems with the DLL loading and unloading (LoadLibrary/FreeLibrary) routine in a program.  I have a code that works fine when compiled in Delphi 7.  But when compiled in the trial version Delphi 2005, the program hangs up on the FreeLibrary(DllHandle) line.  

I've attached the following source code of my program (with the LoadLibrary/FreeLibrary routines that I'm testing):

TestDll - a DLL with an OpenForm entry point (which opens an empty Form); and CloseModule (which releases the Form).

TestDll2 - a DLL with an OpenForm entry point (which opens a Form with Interbase objects TIBDatabase, TIBTransaction and TIBQuery).  CloseModule (which releases the Form).
Form has a button (Button1), when clicked, will force an SQL exception by opening an IBQuery component that selects on a non existing table (select * from test_non_existing_table).

TestExe - an executable application with 4 Buttons:
     Load1 - Loads TestDll.dll and opens empty Form
     Free1 - Closes Form and frees TestDll.dll
     Load2 - Loads TestDll2.dll and opens Form
     Free2 - Closes Form and frees TestDll2.dll

Loading and unloading TestDll.dll and TestDll2.dll doesn't have any problem except when an SQL error occurs in TestDll2.dll.  This can be reproduced:
1.  Run TestExe.exe (Test Exe form will appear)
2.  Click Load2 (Interbase login will appear)
3.  Login as sysdba in localhost (Test Dll 2 form will appear)
4.  Click Button1 to generate SQL exception
5.  Click Free2 in Test Exe from
TestExe.exe will hang up on the FreeLibrary(Lib2) line of the Free2Click procedure.

Is this a bug in Delphi 2005 Trial Version?  Will this still be a problem when we purchase Delphi 2005?  Was this issue addressed in the update patches?

Steps to Reproduce:
Loading and unloading TestDll.dll and TestDll2.dll doesn't have any problem except when an SQL error occurs in TestDll2.dll.  This can be reproduced:
1.  Run TestExe.exe (Test Exe form will appear)
2.  Click Load2 (Interbase login will appear)
3.  Login as sysdba in localhost (Test Dll 2 form will appear)
4.  Click Button1 to generate SQL exception
5.  Click Free2 in Test Exe from
TestExe.exe will hang up on the FreeLibrary(Lib2) line of the Free2Click procedure.
Workarounds
None
Attachment
Dll Test Delphi 2005.zip
Comments

None

Server Response from: ETNACODE01