From 2e880930a97e5aa975d4189f82ed05839f4d7d0a Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Sat, 15 Oct 2022 18:52:49 +0300 Subject: [PATCH] More trace logging to find out what's stopping sequences --- .../simulation/sequences/action/AbstractActionContext.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bundles/org.simantics.simulation.sequences/src/org/simantics/simulation/sequences/action/AbstractActionContext.java b/bundles/org.simantics.simulation.sequences/src/org/simantics/simulation/sequences/action/AbstractActionContext.java index 2900fb07e..167643af9 100644 --- a/bundles/org.simantics.simulation.sequences/src/org/simantics/simulation/sequences/action/AbstractActionContext.java +++ b/bundles/org.simantics.simulation.sequences/src/org/simantics/simulation/sequences/action/AbstractActionContext.java @@ -18,7 +18,7 @@ public abstract class AbstractActionContext implements ActionContext { public static final double TIME_TOLERANCE = 1e-6; double currentTime; - volatile boolean stopped; + volatile boolean stopped = false; ArrayList> scheduledNow = new ArrayList<>(); ArrayList> scheduledNextStep = new ArrayList<>(); ArrayList> scheduledWhenStopped = new ArrayList<>(); @@ -118,8 +118,11 @@ public abstract class AbstractActionContext implements ActionContext { } Task firstTask = scheduledAt.peek(); if(firstTask == null) { - if (scheduledNextStep.isEmpty()) + if (scheduledNextStep.isEmpty()) { + if (LOGGER.isTraceEnabled()) + LOGGER.trace("No work to schedule, stopping empty sequence", new Exception("trace")); stopped = true; + } return Double.POSITIVE_INFINITY; } else if(firstTask.time > currentTime+TIME_TOLERANCE) { return firstTask.time; -- 2.47.1