View Issue Details

IDProjectCategoryView StatusLast Update
0006610JEDI VCL00 JVCL Componentspublic2019-04-30 15:57
ReporterpyscripterAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in VersionDaily / GIT 
Summary0006610: JVCreateProcess appears to be running forever.
DescriptionIf not (coRedirect in ConsoleOptions) and WaitForTerminate = false no waiting thread is created and the state will stay forever as psRunning since HandleThreadTerminated will never be called and there is no way to reset the state to psReady. From that point the component will become unusable i.e. no other process can be created.

It is better in this case to set the state as Ready instead of Running.

So in TJvCreateProcess.Run

    if coRedirect in ConsoleOptions then
    begin
    end
    else
    if WaitForTerminate then
    begin
    end
    else
    begin
      { http://support.microsoft.com/default.aspx?scid=kb;en-us;124121 }
      WaitForInputIdle(FProcessInfo.hProcess, INFINITE);
      GoToReadyState; //GotoRunningState;
    end;


Additional InformationThe attached file contains the modified code plus introduces a new flag for CREATE_NO_WINDOW
TagsNo tags attached.

Activities

2018-01-14 23:39

 

JvCreateProcess.pas (51,105 bytes)

obones

2018-07-18 16:04

administrator   ~0021546

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.

mh

2019-04-27 14:06

reporter   ~0021761

Created this pull request for the issue:
https://github.com/project-jedi/jvcl/pull/98

Issue History

Date Modified Username Field Change
2018-01-14 23:39 pyscripter New Issue
2018-01-14 23:39 pyscripter File Added: JvCreateProcess.pas
2018-07-18 16:04 obones Note Added: 0021546
2018-07-18 16:04 obones Status new => feedback
2019-04-27 14:06 mh Note Added: 0021761
2019-04-30 15:57 obones Status feedback => resolved
2019-04-30 15:57 obones Fixed in Version => Daily / GIT
2019-04-30 15:57 obones Resolution open => fixed
2019-04-30 15:57 obones Assigned To => obones