From 63b2f95cfaa0525a08e8c56eb26a0b5815ab9b35 Mon Sep 17 00:00:00 2001 From: glubsy Date: Sat, 25 Jul 2020 23:37:41 +0200 Subject: [PATCH] Work around frozen progress dialog * It seems that matchblock.getmatches() returns too early and the (multi-)processes become zombies * This is a workaround which seems to work by sleeping for one second and avoid zombie processes --- core/pe/matchblock.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/pe/matchblock.py b/core/pe/matchblock.py index a13a15aa..6f2a0a27 100644 --- a/core/pe/matchblock.py +++ b/core/pe/matchblock.py @@ -9,6 +9,7 @@ import logging import multiprocessing from itertools import combinations +from time import sleep from hscommon.util import extract, iterconsume from hscommon.trans import tr @@ -254,6 +255,9 @@ def getmatches(pictures, cache_path, threshold, match_scaled=False, j=job.nulljo ref.dimensions # pre-read dimensions for display in results other.dimensions result.append(get_match(ref, other, percentage)) + # HACK this is a workaround for when the progress bar gets stuck sometimes, + # as we enter a deadlock somewhere and the sub-processes become zombies. + sleep(1) return result