From 203e48b4e10b71d1a7c889c9ac999e0f6107672c Mon Sep 17 00:00:00 2001 From: HashEngineering Date: Fri, 5 Apr 2024 13:11:45 -0700 Subject: [PATCH] feat: add deadlock detection support --- 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 4d1c265c6..f63802c56 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 39f1ba985..ad3277735 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);