RootTools icon indicating copy to clipboard operation
RootTools copied to clipboard

java.lang.IllegalStateException: Unable to add commands to a closed shell

Open abeboparebop opened this issue 9 years ago • 2 comments

I'm getting the RootTools shell and executing commands like so:

RootTools.getShell(true).add(cmd);

and sometimes (not always, and not reproduceably) it throws the error mentioned above.

In the same code, I'm performing various other root commands, using other RootTools functions (copyFile, remount), and also explicitly running some commands with Runtime.getRuntime().exec(), both before and after this call. But I'm only explicitly calling getShell once. How can I fix/work around this issue? I can check to see if the shell that getShell returns is closed, but I don't know how to get an open shell in that case.

abeboparebop avatar May 08 '15 21:05 abeboparebop

I've got the exact same issue myself. Did you ever figure out was the cause was or how to get around it?

ryan1978 avatar Mar 07 '16 18:03 ryan1978

No, I'm sorry. We ultimately decided that we could deal with it, basically.

abeboparebop avatar Mar 07 '16 20:03 abeboparebop