When wget runs and the activity closes, this happens:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: eu.quelltext.wget, PID: 29013
java.lang.RuntimeException: Unable to stop activity {eu.quelltext.wget/eu.quelltext.wget.activities.CommandActivity}: java.lang.IllegalMonitorStateException: object not locked by thread before wait()
at android.app.ActivityThread.callActivityOnStop(ActivityThread.java:4189)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4159)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4234)
at android.app.servertransaction.StopActivityItem.execute(StopActivityItem.java:41)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.IllegalMonitorStateException: object not locked by thread before wait()
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:422)
at eu.quelltext.wget.bin.Executable$ExecutionResult.kill(Executable.java:109)
at eu.quelltext.wget.activities.CommandActivity.onStop(CommandActivity.java:201)
at android.app.Instrumentation.callActivityOnStop(Instrumentation.java:1432)
at android.app.Activity.performStop(Activity.java:7375)
Code:
@Override
public void kill() {
process.destroy();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
try {
process.wait(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
process.destroyForcibly();
}
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too