View Issue Details

IDProjectCategoryView StatusLast Update
0002827JEDI VCL00 JVCL Componentspublic2005-05-18 06:29
ReportergnataliAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformPCOSWindowsOS Version98SE-4.10.2222 A
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0002827: TJvErrorIndicator raise a "Thread error: The Parameter is incorrect (87)" error
DescriptionWhen TJvErrorIndicator destroy the TJvBlinkThread instance in StopThread function, the exception is raised.

The execute function of TJvBlinkThread contient a call to sleep function.
Steps To ReproduceJvErrorIndicator.BeginUpdate;
JvErrorIndicator.Error[AControl1]:='A text';
JvErrorIndicator.EndUpdate;
// now TJvBlinkThread is executed
JvErrorIndicator.BeginUpdate; //<-- raise an exception
JvErrorIndicator.Error[AControl2]:='A text';
JvErrorIndicator.EndUpdate;
Additional InformationTo correct this, remplace :
procedure TJvErrorIndicator.StopThread;
begin
  if FBlinkThread <> nil then
    FBlinkThread.Terminate;
  FreeAndNil(FBlinkThread);
end;

BY

procedure TJvErrorIndicator.StopThread;
begin
  if FBlinkThread <> nil then
  begin
    FBlinkThread.Terminate;
    FBlinkThread.WaitFor;
  end;
  FreeAndNil(FBlinkThread);
end;
TagsNo tags attached.

Activities

outchy

2005-04-01 09:19

administrator   ~0006824

Fixed in the CVS version with :

procedure TJvErrorIndicator.StopThread;
begin
  if FBlinkThread <> nil then
  try
    FBlinkThread.Terminate;
    FBlinkThread.WaitFor;
  finally
    FreeAndNil(FBlinkThread);
  end;
end;

obones

2005-04-11 06:22

administrator   ~0006894

This is very strange, because Free is calling Terminate then WaitFor if the thread is still running. Hence, there shouldn't be any need to actually ask for the thread to stop.

obones

2005-05-18 06:29

administrator   ~0007198

Ah well, anyway, this is resolved.

Issue History

Date Modified Username Field Change
2005-04-01 06:14 gnatali New Issue
2005-04-01 09:19 outchy Note Added: 0006824
2005-04-11 06:22 obones Note Added: 0006894
2005-05-18 06:29 obones Status new => resolved
2005-05-18 06:29 obones Resolution open => fixed
2005-05-18 06:29 obones Assigned To => obones
2005-05-18 06:29 obones Note Added: 0007198