From a58feb56995f687baae9b605c71379fe94fbf0dc Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Mon, 20 Nov 2023 00:24:19 +0100 Subject: [PATCH] fix IllegalMonitorException --- .../java/de/uka/ilkd/key/ui/MediatorProofControl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/key.ui/src/main/java/de/uka/ilkd/key/ui/MediatorProofControl.java b/key.ui/src/main/java/de/uka/ilkd/key/ui/MediatorProofControl.java index 887fc4d6ecc..eb7625c1142 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/ui/MediatorProofControl.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/ui/MediatorProofControl.java @@ -171,6 +171,7 @@ private class AutoModeWorker extends SwingWorker { private final ImmutableList goals; private final ApplyStrategy applyStrategy; private ApplyStrategyInfo info; + private final ReentrantLock lock; private final Condition ready; public AutoModeWorker(final Proof proof, final ImmutableList goals, @@ -189,7 +190,8 @@ public AutoModeWorker(final Proof proof, final ImmutableList goals, applyStrategy.addProverTaskObserver(ui.getMediator().getAutoSaver()); } - ready = new ReentrantLock().newCondition(); + lock = new ReentrantLock(); + ready = lock.newCondition(); } @Override @@ -209,7 +211,11 @@ protected void done() { applyStrategy.clear(); } ui.getMediator().finishAutoMode(proof, true, true, null); + + lock.lock(); ready.signalAll(); + lock.unlock(); + emitInteractiveAutoMode(initialGoals, proof, info); if (info.getException() != null) {