From: Tuukka Lehtonen Date: Sat, 15 Oct 2022 15:52:49 +0000 (+0300) Subject: More trace logging to find out what's stopping sequences X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=2e880930a97e5aa975d4189f82ed05839f4d7d0a;p=simantics%2Fplatform.git More trace logging to find out what's stopping sequences --- 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;