From 3b24d8d0ddbc31044c5071e09118415d0a4227d7 Mon Sep 17 00:00:00 2001 From: HashEngineering Date: Mon, 8 Apr 2024 08:44:53 -0700 Subject: [PATCH] feat: add deadlock detection support (#1277) --- build.gradle | 2 +- wallet/src/de/schildbach/wallet/WalletApplication.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 4d1c265c6d..f63802c56f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { kotlin_version = '1.8.22' coroutinesVersion = '1.6.4' ok_http_version = '4.9.1' - dashjVersion = '20.0.3' + dashjVersion = '20.0.4-SNAPSHOT' hiltVersion = '2.45' hiltWorkVersion = '1.0.0' workRuntimeVersion='2.7.1' diff --git a/wallet/src/de/schildbach/wallet/WalletApplication.java b/wallet/src/de/schildbach/wallet/WalletApplication.java index 39f1ba985b..ad32777352 100644 --- a/wallet/src/de/schildbach/wallet/WalletApplication.java +++ b/wallet/src/de/schildbach/wallet/WalletApplication.java @@ -259,6 +259,9 @@ protected void onStoppedLast() { } CrashReporter.init(getCacheDir()); + // enable deadlock warnings to try to catch the cause of the stuck at "Syncing 31%" + Threading.setUseDefaultAndroidPolicy(false); + Threading.warnOnLockCycles(); Threading.uncaughtExceptionHandler = (thread, throwable) -> { log.info("dashj uncaught exception", throwable);