You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're experiencing a crash, coming from Shell object, that happens sporadically, but on many devices (+100 devices).
The crash is seen with the newest version of the lib, i.e. "eu.chainfire:libsuperuser:1.1.0.202004101746"
The stacktrace is as following:
Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'boolean java.lang.Thread.isAlive()' on a null object reference
eu.chainfire.libsuperuser.Shell$Threaded.onClosed (Shell.java:2884)
eu.chainfire.libsuperuser.Shell$Interactive.runNextCommand (Shell.java:1876)
eu.chainfire.libsuperuser.Shell$Interactive.runNextCommand (Shell.java:1726)
eu.chainfire.libsuperuser.Shell$Interactive.access$3700 (Shell.java:1526)
eu.chainfire.libsuperuser.Shell$Interactive$6.onStreamClosed (Shell.java:2119)
eu.chainfire.libsuperuser.StreamGobbler.run (StreamGobbler.java:169)
Looking at Shell.java:2884 it's obvious that it will produce a nullPointer (possibly in multiple following lines as well) if the handlerThread field variable is null.
Unfortunately I have not been able to reproduce the crash myself. I have also not been able to logically walk through the Shell code to understand how onClosed may be called while handlerThread is still null, or how it could somehow become a null object before the final statement is reached in onClosed. My best guess would therefore be a couple of simple null checks, which I assume would be safe in terms of quitting the thread, as it presumably would not exist or already have been GC in that case.
Any help or possible fix would be greatly appreciated, thanks! :)
The text was updated successfully, but these errors were encountered:
Hi
We're experiencing a crash, coming from Shell object, that happens sporadically, but on many devices (+100 devices).
The crash is seen with the newest version of the lib, i.e. "eu.chainfire:libsuperuser:1.1.0.202004101746"
The stacktrace is as following:
Looking at Shell.java:2884 it's obvious that it will produce a nullPointer (possibly in multiple following lines as well) if the handlerThread field variable is null.
Unfortunately I have not been able to reproduce the crash myself. I have also not been able to logically walk through the Shell code to understand how onClosed may be called while handlerThread is still null, or how it could somehow become a null object before the final statement is reached in onClosed. My best guess would therefore be a couple of simple null checks, which I assume would be safe in terms of quitting the thread, as it presumably would not exist or already have been GC in that case.
Any help or possible fix would be greatly appreciated, thanks! :)
The text was updated successfully, but these errors were encountered: