Random error while processing routes

Hi, I have a routing problem of 1700 services, some with small time windows, the universe is finite with 40 vehicles and grouping contraints or maximum distances, the problem is that randomly happens an error that interrupts the iterations of the solution of the Path, if it is processed again is correct, the error message is:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at jsprit.core.algorithm.recreate.RegretInsertionConcurrent.nextJob(RegretInsertionConcurrent.java:169)
	at jsprit.core.algorithm.recreate.RegretInsertionConcurrent.insertUnassignedJobs(RegretInsertionConcurrent.java:116)
	at jsprit.core.algorithm.recreate.AbstractInsertionStrategy.insertJobs(AbstractInsertionStrategy.java:91)
	at jsprit.core.algorithm.InsertionInitialSolutionFactory.createSolution(InsertionInitialSolutionFactory.java:56)
	at jsprit.core.algorithm.PrettyAlgorithmBuilder$1.informAlgorithmStarts(PrettyAlgorithmBuilder.java:118)
	at jsprit.core.algorithm.listener.VehicleRoutingAlgorithmListeners.algorithmStarts(VehicleRoutingAlgorithmListeners.java:128)
	at jsprit.core.algorithm.VehicleRoutingAlgorithm.algorithmStarts(VehicleRoutingAlgorithm.java:311)
	at jsprit.core.algorithm.VehicleRoutingAlgorithm.searchSolutions(VehicleRoutingAlgorithm.java:211)
	at com.globalgis.ruteosim.ProgramaRutasDistribucionBDPlugIn.run(ProgramaRutasDistribucionBDPlugIn.java:1544)
	at com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:151)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask.report(Unknown Source)
	at java.util.concurrent.FutureTask.get(Unknown Source)
	at jsprit.core.algorithm.recreate.RegretInsertionConcurrent.nextJob(RegretInsertionConcurrent.java:151)
	... 10 more
Caused by: java.lang.NullPointerException
	at jsprit.core.algorithm.state.StateManager.getProblemState(StateManager.java:185)
	at com.globalgis.ruteosim.ProgramaRutasDistribucionBDPlugIn$TramosActividadesConsecutivasConstraint.fulfilled(ProgramaRutasDistribucionBDPlugIn.java:4985)
	at jsprit.core.algorithm.recreate.AbstractInsertionCalculator.fulfilled(AbstractInsertionCalculator.java:52)
	at jsprit.core.algorithm.recreate.ShipmentInsertionCalculator.getInsertionData(ShipmentInsertionCalculator.java:154)
	at jsprit.core.algorithm.recreate.JobCalculatorSwitcher.getInsertionData(JobCalculatorSwitcher.java:40)
	at jsprit.core.algorithm.recreate.VehicleTypeDependentJobInsertionCalculator.getInsertionData(VehicleTypeDependentJobInsertionCalculator.java:116)
	at jsprit.core.algorithm.recreate.RegretInsertion.getScoredJob(RegretInsertion.java:187)
	at jsprit.core.algorithm.recreate.RegretInsertionConcurrent$1.call(RegretInsertionConcurrent.java:142)
	at jsprit.core.algorithm.recreate.RegretInsertionConcurrent$1.call(RegretInsertionConcurrent.java:138)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	... 1 more

What do you think this error can be?

regards

Dante Fuster

This seems to be related to this external plugin which passes stateId==null to the StateManager.

If you still thing this is something in jsprit would you mind to post code that makes this problem reproducable?

It is not external plugin (ok, external plugin for a GIS) , it is a program that defines the vehicles, services, and invokes jsprit to execute the constraints and find the solution,
Is a random error, sometimes shows that error, usually does not happen.

Thank you