jenkinsci / jenkinsci/benchmark-plugin
NullPointer exception on second build
- Dominant language
- Java
- Stars
- 7
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Using 1.0.11
In a test project i collected the results for the first build without issues, but after the second collection on i'm getting the following null pointer exception:
```
java.lang.NullPointerException
at org.jenkinsci.plugins.benchmark.results.TestValue.convertCondensedResultJsonObject(TestValue.java:237)
at org.jenkinsci.plugins.benchmark.parsers.MapperBase.importCondensedFromFile(MapperBase.java:853)
at org.jenkinsci.plugins.benchmark.parsers.MapperBase.importCondensedFromFile(MapperBase.java:771)
at org.jenkinsci.plugins.benchmark.core.BenchmarkPublisher.getRawResults(BenchmarkPublisher.java:328)
at org.jenkinsci.plugins.benchmark.core.BenchmarkPublisher.perform(BenchmarkPublisher.java:201)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```
Removing the condensed data file and re-running repeats the result. Moreover it seems that with one run, the table doesn't appear on the web. I have a workaround by not using integers in my results, but double values. The code line pointed by the exception seems to point at de-referencing previous or max/min int values that are null. This is not done with other value types.
Contributor guide
Research direction
Start at TestValue.java:237, where the stack trace reports the failure in convertCondensedResultJsonObject, then follow the import path through MapperBase.java and BenchmarkPublisher.java. Reproduce a second collection with integer results using version 1.0.11 and inspect the condensed data handling. Done means integer results no longer cause the exception and the results table appears after collection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100