In all my years in RB/RS/Xojo, I thought that i’d seem it all - but, 22r3 brings something new to the table. In running a project in the debugger that has been built many times in prior versions, I and now seeing an error reporting “No shell available” and the process hangs beaus emy Do … Loop until Not theShell.IsRuning is always True.
I looked in Documentation for a change for 2022r3 but didn’t find. Looks like the possibility of searching for a specific version is gone. @Dana_Brown has this been changed ?
Part of your comment is scrambled, what did you want to type ?
This is in the notes:
The process running in the Shell is killed when the object gets out of scope even if running in asynchronous or interactive modes.
Could it be it’s the command you invoke that is returning this as the result? (instead of the Xojo shell itself)?
Can you tell us which command you’re trying to call?
Seems like that sometimes the shell process ends/dies and that’s why you get a “No Shell”, but due to some bug the IsRunning is not set to false. You need to report it.
You can try to workaround it inspecting some other property too, maybe PID = 0?
Do
theShell.Poll
Loop Until (Not theShell.IsRunning) Or theShell.PID = 0
Also inspect if the event Completed fires even when you get the “No Shell” situation.
Because events do not fit the design model for this application (and others). I need a top down flow that is more strictly controlled by a functional flow.
This code has worked properly for more than 14 years with all prior variants of RB/RS/Xojo and the Shell.
I don’t see the need for the polling, either. If you run the Shell in Synchronous mode, it will wait for the ‘cat’ command to finish before continuing to the next line of code.
I think that -1 means “no error code set yet” for asynchronous operations. Because 0 means “Done, no errors”.
Have in mind that the OP says that previous versions checking just shell.IsRunning was enough, now it does not change the state (wrongly saying “forever running”) and no error/success is set (-1)
Seems like that the system breaks internally, ends, but does not set any end state.