Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006642 [JEDI VCL] 00 JVCL Components crash N/A 2018-07-05 17:59 2018-07-18 17:39
Reporter swright View Status public  
Assigned To
Priority normal Resolution open  
Status feedback   Product Version Daily / GIT
Summary 0006642: JvWaitingGradient/JvImagedrawThread deadlock condition
Description Execute method calls EnterUnpausableSection

Execute method then calls Synchronize(Draw); which pauses the thread to execute the draw method in main thread.

In the main thread an event occurs that changes the Active property of the JvWaitingGradient to False before the draw event, this makes the main thread Acquire FPauseSection and both threads are deadlocked.

Possibly the Syncronise call should come after the thread releases FPauseSection.
Additional Information Delphi 10.1 Berlin / JVCL-3.51 APR 2018 (installed via GetIt package manager)
Tags No tags attached.
Attached Files zip file icon WGTest.zip [^] (5,340 bytes) 2018-07-18 17:38

- Relationships

-  Notes
(0021548)
obones (administrator)
2018-07-18 16:05

Could you check if the issue is still present in the latest GIT content? If yes, please provide the zipped sources of an application showing this.
(0021555)
swright (reporter)
2018-07-18 17:39

fix, move Synchronize(Draw); outside of TCriticalSection.

procedure TJvImageDrawThread.Execute;
begin
  NameThread(ThreadName);
  try
    while not Terminated do
    begin
      Sleep(FDelay);
      EnterUnpauseableSection;
      try
        if Terminated then
          Exit;


      finally
        LeaveUnpauseableSection;
        Synchronize(Draw);
      end;
    end;
  except
    // ignore exception
  end;
end;

- Issue History
Date Modified Username Field Change
2018-07-05 17:59 swright New Issue
2018-07-18 16:05 obones Note Added: 0021548
2018-07-18 16:05 obones Status new => feedback
2018-07-18 17:38 swright File Added: WGTest.zip
2018-07-18 17:39 swright Note Added: 0021555


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker