[
https://issues.jboss.org/browse/JBRULES-3460?page=com.atlassian.jira.plug...
]
Lukáš Petrovický updated JBRULES-3460:
--------------------------------------
Description:
Whenever I configure tabu search (be it solution, move or planning entity) in my acceptor,
I get the following NPE:
Exception in thread "main" java.lang.NullPointerException
at
org.drools.planner.core.localsearch.decider.acceptor.tabu.AbstractTabuAcceptor.stepTaken(AbstractTabuAcceptor.java:163)
at
org.drools.planner.core.localsearch.decider.acceptor.CompositeAcceptor.stepTaken(CompositeAcceptor.java:69)
at
org.drools.planner.core.localsearch.decider.DefaultDecider.stepTaken(DefaultDecider.java:166)
at
org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.stepTaken(DefaultLocalSearchSolverPhase.java:107)
at
org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:71)
at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:183)
at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:151)
at org.drools.planner.examples.ras2012.App.main(App.java:25)
Looking at the relevant place in code, we find:
Integer oldTabuStepIndexInteger = tabuToStepIndexMap.get(oldTabu);
int oldTabuStepCount = tabuStepIndex - oldTabuStepIndexInteger; // at least 1
It appears that the code doesn't cover the case where tabuToStepIndexMap doesn't
contain oldTabu.
Should a reproducer be needed, please look at the following Github repo, configure the
solver to use tabus, and launch the application via App.java:
https://github.com/triceo/ras12
was:
Whenever I configure tabu search (be it solution, move or planning entity) in my acceptor,
I get the following NPE:
Exception in thread "main" java.lang.NullPointerException
at
org.drools.planner.core.localsearch.decider.acceptor.tabu.AbstractTabuAcceptor.stepTaken(AbstractTabuAcceptor.java:163)
at
org.drools.planner.core.localsearch.decider.acceptor.CompositeAcceptor.stepTaken(CompositeAcceptor.java:69)
at
org.drools.planner.core.localsearch.decider.DefaultDecider.stepTaken(DefaultDecider.java:166)
at
org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.stepTaken(DefaultLocalSearchSolverPhase.java:107)
at
org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:71)
at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:183)
at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:151)
at org.drools.planner.examples.ras2012.App.main(App.java:25)
Looking at the relevant place in code, we find:
Integer oldTabuStepIndexInteger = tabuToStepIndexMap.get(oldTabu);
int oldTabuStepCount = tabuStepIndex - oldTabuStepIndexInteger; // at least 1
It appears that the code doesn't cover the situation where tabuToStepIndexMap
doesn't cover the case of oldTabu not being present.
Should a reproducer be needed, please look at the following Github repo, configure the
solver to use tabus, and launch the application via App.java:
https://github.com/triceo/ras12
NPE when using Tabu
-------------------
Key: JBRULES-3460
URL:
https://issues.jboss.org/browse/JBRULES-3460
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-planner
Environment: java version "1.7.0_b147-icedtea"
OpenJDK Runtime Environment (fedora-2.1.fc17.2-x86_64)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)
Reporter: Lukáš Petrovický
Assignee: Geoffrey De Smet
Whenever I configure tabu search (be it solution, move or planning entity) in my
acceptor, I get the following NPE:
Exception in thread "main" java.lang.NullPointerException
at
org.drools.planner.core.localsearch.decider.acceptor.tabu.AbstractTabuAcceptor.stepTaken(AbstractTabuAcceptor.java:163)
at
org.drools.planner.core.localsearch.decider.acceptor.CompositeAcceptor.stepTaken(CompositeAcceptor.java:69)
at
org.drools.planner.core.localsearch.decider.DefaultDecider.stepTaken(DefaultDecider.java:166)
at
org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.stepTaken(DefaultLocalSearchSolverPhase.java:107)
at
org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:71)
at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:183)
at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:151)
at org.drools.planner.examples.ras2012.App.main(App.java:25)
Looking at the relevant place in code, we find:
Integer oldTabuStepIndexInteger = tabuToStepIndexMap.get(oldTabu);
int oldTabuStepCount = tabuStepIndex - oldTabuStepIndexInteger; // at least
1
It appears that the code doesn't cover the case where tabuToStepIndexMap doesn't
contain oldTabu.
Should a reproducer be needed, please look at the following Github repo, configure the
solver to use tabus, and launch the application via App.java:
https://github.com/triceo/ras12
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira