Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-1064

Solver.getTimeMillisSpent() and Solver.getBestScore() need to be thread safe (and javadocced as such)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 7.7.0.Final
    • None
    • optaplanner-core
    • None
    • 2018 Week 11-12
    • NEW
    • NEW

    Description

      When calling getTimeMillisSpent from an other thread just at the start of solving you sometimes get a NullPointerException

      Here is the relevant part of the stack trace, the calling thread just calls

      solver.getTimeMillisSpent()
      
      java.lang.NullPointerException
              at org.optaplanner.core.impl.solver.DefaultSolver.getTimeMillisSpent(DefaultSolver.java:116)
      

      I haven't been able to make a reproducer since it is very intermittent, and hard to reproduce consistently.

      Attachments

        Activity

          People

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            ohlle Daniel Ohlsson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: