[Gambas-user] Process' events stall after restart

Tobias Boege taboege at ...626...
Sat Jan 19 19:33:55 CET 2013


On Sat, 19 Jan 2013, Beno?t Minisini wrote:
> Le 16/01/2013 17:32, Tobias Boege a ?crit :
> > Hi Benoit,
> >
> > we noticed that the Read and Error events of a newly started Process don't
> > fire up when a former process was killed and the variable holding that
> > process gets filled with the new one which in turn shows the symptoms above.
> >
> > To reproduce, open and start the attached project and
> >
> > 1. Start the process
> > 2. Verify that it works by sending the sample command
> > 3. Kill the process
> > 4. Restart it
> > 5. Send another command which yields nothing
> > 6. Kill the process and see the output being flushed into the TextArea
> >
> > This does not happen when step 3 reads "Start/Replace the process"
> > (consequently step 4 would be useless but the result is indifferent).
> >
> > You will find a NOTE line in the source code. If one, before the new Process
> > gets started, assigns Null to the Process variable, everything seems to
> > work and output comes in instantly. Please tell me what is not supposed to
> > be done in a certain way there.
> >
> > It was somewhat difficult to reproduce the issue in a smaller project than
> > the original one. I couldn't find any alternative to the 'bc' program. Hope
> > you can bear that dependency.
> >
> > Regards,
> > Tobi
> >
> 
> That bug should be fixed in revision #5511.
> 

Yes, I confirm.

> As for your comment: BTW: Doesn't Gambas support "short-circuit 
> evaluation"?... Are you looking for the following syntax?
> 
>    If $hProcess And If $hProcess.State = Process.Running Then
> 

Oh, alright! I tried without the second If...
Hrm, it is big and fat in the docs :-/

Thanks,
Tobi




More information about the User mailing list