Le 21/08/2016 à 02:56, Jussi Lahtinen a écrit :
>> I tried on a Mint VirtualBox VM, and still have "Test passed!" as
>> result. Can you tell me exactly where it fails in the code?
>>
>
> Randomly in module mTest at lines 1685, 1694, 1704 and 1714. So at every
> occurrence of code 'If sTest <> "test" & gb.NewLine Then'.
> Every time it fails the string sTest is empty, this should never occur if
> the process has been ran. Or why else the string is empty?
>
> See attached screenshot.
>
> Now I realize that there is property "Blocking", which is false... so could
> it be that the process is read too early and process.wait only waits for
> some input..?

No. Blocking is for stream read & write methods. The Wait() method does 
not take them into account. It just waits for the process end. The 
problem is that on your system the input stream from the process is not 
flushed.

If 'sTest' is empty, that means that the Read event is never called, 
i.e. either the process output file descriptor is never ready to be 
read, or is ready to be read but is void (it is theoritically possible).

I have run the four problematic tests thousands of time, and everything 
works there.

Normally, when I (the interpreter) catch the process end, I carefully 
send process Read events until the received pipe is flushed. So I don't 
understand the behaviour on your system.

If other people could run the same four tests, it may help fix the 
problem...

-- 
Benoît Minisini

------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to