[Scummvm-git-logs] scummvm branch-2-8 -> 5a4f65d024b7904790078b40ec7a171ae2f0148d
lephilousophe
noreply at scummvm.org
Sat Dec 9 22:28:34 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5a4f65d024 ANDROID: Kill ourselves if the main thread failed to join
Commit: 5a4f65d024b7904790078b40ec7a171ae2f0148d
https://github.com/scummvm/scummvm/commit/5a4f65d024b7904790078b40ec7a171ae2f0148d
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-12-09T23:26:44+01:00
Commit Message:
ANDROID: Kill ourselves if the main thread failed to join
This should avoid the infamous assertion fault with _system not being
null.
Changed paths:
backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
index 85d56a421dd..de6f7529cee 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
@@ -24,6 +24,7 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
+import android.os.Process;
import android.os.SystemClock;
import android.provider.DocumentsContract;
import android.text.TextUtils;
@@ -1093,11 +1094,16 @@ public class ScummVMActivity extends Activity implements OnKeyboardVisibilityLis
_scummvm.setPause(false);
try {
// 1s timeout
- _scummvm_thread.join(1000);
+ _scummvm_thread.join(2000);
} catch (InterruptedException e) {
Log.i(ScummVM.LOG_TAG, "Error while joining ScummVM thread", e);
}
+ // Our join failed: kill ourselves to not have two ScummVM running at the same time
+ if (_scummvm_thread.isAlive()) {
+ Process.killProcess(Process.myPid());
+ }
+
_finishing = false;
_scummvm = null;
}
More information about the Scummvm-git-logs
mailing list