Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
RTL
Delphi
Arithmetic
ConvUtils
Date - Time
DateUtils
File Management
Format + Float
Input/Output
Math Unit
Memory, Pointer, Address
Null-terminated strings
Other Classes
Other RTL
Pascal Strings
Regular Expressions
RTL Exceptions
Text Files
Thread support
Typed/Untyped Files
WinAPI
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/RTL/Delphi/Thread support
[ Add a report in this area ]
Report #:
90487
Status:
Closed
TMonitor.Enter, closing app, hangs in SysUtils.DoneMonitorSupport
Project:
Delphi
Build #:
14.0.3593.25826
Version:
14.0
Submitted By:
andre mussche
Report Type:
Basic functionality failure
Date Reported:
12/22/2010 11:57:17 PM
Severity:
Serious / Highly visible problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All platforms
Internal Tracking #:
281510
Resolution:
Test Case Error
(Resolution Comments)
Resolved in Build:
:
16.0.4223.41907
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
When using TMonitor.Enter in 2 threads (so one gets locked) and never releasing the lock, the application will hang (100%) in DoneMonitorSupport when closing.
Steps to Reproduce:
1: Use code below
2: start app
3: close app
4: 100 cpu%!
==============================
unit Unit5;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm5 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
TTestThread = class(TThread)
protected
procedure Execute;override;
end;
var
Form5: TForm5;
implementation
{$R *.dfm}
var
o: TObject;
procedure TForm5.FormCreate(Sender: TObject);
begin
o := TObject.Create;
System.TMonitor.Enter(o);
TTestThread.Create(False {direct run});
end;
{ TTestThread }
procedure TTestThread.Execute;
begin
System.TMonitor.Enter(o);
end;
end.
Workarounds
None, only be very sure to release all locks and free all objects...
Attachment
None
Comments
None
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