You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
By using the new ConstraintCollectors.toConnectedRanges we always run into the exception where the splitPoint == nullwhich crashes the entire application. To reproduce I recreated the example from the documentation, which has the same issue.
Expected behavior
Runs without exception.
Actual behavior
Crashes with:
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.Comparable.compareTo(Object)" because "this.splitPoint" is null
at ai.timefold.solver.core.impl.score.stream.collector.connected_ranges.RangeSplitPoint.compareTo(RangeSplitPoint.java:109)
at ai.timefold.solver.core.impl.score.stream.collector.connected_ranges.RangeSplitPoint.compareTo(RangeSplitPoint.java:9)
at java.base/java.util.TreeMap.compare(TreeMap.java:1604)
at java.base/java.util.TreeMap.getFloorEntry(TreeMap.java:463)
at java.base/java.util.TreeMap.floorKey(TreeMap.java:1045)
at java.base/java.util.TreeSet.floor(TreeSet.java:426)
at ai.timefold.solver.core.impl.score.stream.collector.connected_ranges.ConnectedRangeTracker.remove(ConnectedRangeTracker.java:80)
at ai.timefold.solver.core.impl.score.stream.collector.ConnectedRangesCalculator.retract(ConnectedRangesCalculator.java:30)
at ai.timefold.solver.core.impl.score.stream.collector.bi.ObjectCalculatorBiCollector.lambda$accumulator$0(ObjectCalculatorBiCollector.java:26)
at ai.timefold.solver.core.impl.score.stream.bavet.common.AbstractGroupNode.retract(AbstractGroupNode.java:261)
at ai.timefold.solver.core.impl.score.stream.bavet.common.StaticPropagationQueue.propagate(StaticPropagationQueue.java:93)
at ai.timefold.solver.core.impl.score.stream.bavet.common.StaticPropagationQueue.propagateRetracts(StaticPropagationQueue.java:83)
at ai.timefold.solver.core.impl.score.stream.bavet.common.Propagator.propagateEverything(Propagator.java:64)
at ai.timefold.solver.core.impl.score.stream.bavet.BavetConstraintSession.calculateScoreInLayer(BavetConstraintSession.java:92)
at ai.timefold.solver.core.impl.score.stream.bavet.BavetConstraintSession.calculateScore(BavetConstraintSession.java:83)
at ai.timefold.solver.core.impl.score.director.stream.BavetConstraintStreamScoreDirector.calculateScore(BavetConstraintStreamScoreDirector.java:49)
at ai.timefold.solver.core.impl.score.director.AbstractScoreDirector.assertExpectedUndoMoveScore(AbstractScoreDirector.java:642)
at ai.timefold.solver.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.doMove(ConstructionHeuristicDecider.java:138)
at ai.timefold.solver.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.decideNextStep(ConstructionHeuristicDecider.java:107)
at ai.timefold.solver.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.solve(DefaultConstructionHeuristicPhase.java:62)
at ai.timefold.solver.core.impl.solver.AbstractSolver.runPhases(AbstractSolver.java:82)
at ai.timefold.solver.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:200)
at <mypackage>.ConnectedRangeDemo.main(ConnectedRangeDemo.java:22)
Describe the bug
By using the new
ConstraintCollectors.toConnectedRanges
we always run into the exception where thesplitPoint == null
which crashes the entire application. To reproduce I recreated the example from the documentation, which has the same issue.Expected behavior
Runs without exception.
Actual behavior
Crashes with:
To Reproduce
Environment
Timefold Solver Version or Git ref:
Tested on
1.12.0
and1.10.0
Output of
java -version
:The text was updated successfully, but these errors were encountered: