Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
Debugger
Breakpoints
Call Stack
Corba DBK
Corba UI
CPU
Debugger UI
Evaluator
Evaluator ToolTips
Evaluator View
Event Log View
Exceptions
Execution
FPU
Inspector
Interaction with IDE
Kernel
Local Variables View
Module View
Multi-process
Remote Debugging
Stepping
TD32 Keys
Thread View
Watches
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Debugger/Kernel
[ Add a report in this area ]
Report #:
105214
Status:
Open
[x64] The debugger keeps a handle open to loaded DLLs
Project:
Delphi
Build #:
16.0.4429.46931
Version:
16.4
Submitted By:
Olivier Sannier
Report Type:
Crash / Data loss / Total failure
Date Reported:
4/26/2012 6:58:46 AM
Severity:
Commonly encountered problem
Last Updated:
4/30/2012 1:31:39 AM
Platform:
All versions
Internal Tracking #:
27670
Resolution:
None
(Resolution Comments)
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
[x64]
Programs can load DLL files via LoadLibrary and unload them via FreeLibrary.
When this happens, the x64 debugger (dbkw64_16_0.exe) opens its own handle to the given DLL file and keeps it until the host process is closed.
This is problematic because the DLL might have been generated by the host process, which then wants to delete the generated DLL file when it no longer needs it.
In my case, this happens in a series of unit tests where many generations are done one after the other.
But because the x64 debugger keeps a handle opened on the DLL file, one cannot delete it (the file is still there despite DeleteFile returning true) nor can it overwrite it.
The x64 debugger should close its own handle to the loaded library as soon as the debugged process releases its last reference too.
Steps to Reproduce:
Open the project group in the attachment
Run the DUnit project under XE2
See that the test fails
If you run outside the IDE, the test succeeds.
Workarounds
Use ProcessExplorer to "kill" the handle that dbkw64_16_0.exe is holding
Attachment
105214.zip
Comments
Tomohiro Takahashi at 4/26/2012 7:42:37 AM
-
I deleted QC#105212, 105213 as Sysop. Please do not post same reports.
Tomohiro Takahashi at 5/2/2012 7:30:42 PM
-
This report was opened with valid Internal Tracking Number.
Thanks.
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us