Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64070

NullPointerException within Report.copyProperties on Analysis Model API Plugin 9.2.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: analysis-model
    • Labels:
      None
    • Environment:
      Jenkins 2.249.2
      Warnings Next Generation Plugin 8.4.4
      Analysis Model API Plugin 9.2.1
    • Similar Issues:

      Description

      I got this stack trace when using Warnings Next Generation Plugin 8.4.4 and Analysis Model API Plugin 9.2.1 on 2020-10-28, for build #69 of a branch whose previous build #68 had been done on 2020-02-03:

      java.lang.NullPointerException
        at java.util.AbstractCollection.addAll(AbstractCollection.java:343)
        at edu.hm.hafner.analysis.Report.copyProperties(Report.java:669)
        at edu.hm.hafner.analysis.Report.copyIssuesAndProperties(Report.java:661)
        at edu.hm.hafner.analysis.Report.addAll(Report.java:194)
        at io.jenkins.plugins.analysis.core.model.AnalysisResult.getIssues(AnalysisResult.java:413)
        at io.jenkins.plugins.analysis.core.model.AnalysisHistory$$Lambda$359/0000000000000000.apply(Unknown Source)
        at java.util.Optional.map(Optional.java:215)
        at io.jenkins.plugins.analysis.core.model.AnalysisHistory.getIssues(AnalysisHistory.java:142)
        at io.jenkins.plugins.analysis.core.model.DeltaReport.<init>(DeltaReport.java:48)
        at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:110)
        at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:721)
        at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:651)
        at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:617)
        at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1024)
        at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:985)
        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$$Lambda$330/0000000000000000.run(Unknown Source)
        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:821)
      

      A commit on the branch soon triggered build #70, which failed with the same stack trace.

      I then downgraded Warnings Next Generation Plugin from 8.4.4 to 8.4.3 and Analysis Model API Plugin from 9.2.1 to 9.1.0, and started build #71, which succeeded.

      Finally, I upgraded Warnings Next Generation Plugin from 8.4.3 to 8.4.4 and Analysis Model API Plugin from 9.1.0 to 9.2.1, and started build #72, which succeeded, even though build #70 of the same commit had failed with the same plugin versions.

      (Originally reported in a comment on JENKINS-63659.)

        Attachments

          Issue Links

            Activity

            Hide
            kon Kalle Niemitalo added a comment -

            For what it is worth, build.xml in build #68 from February has <io.jenkins.plugins.analysis.core.model.ResultAction plugin="warnings-ng@8.2.0"> and <edu.hm.hafner.analysis.Severity plugin="analysis-model-api@8.2.0">.

            Show
            kon Kalle Niemitalo added a comment - For what it is worth, build.xml in build #68 from February has <io.jenkins.plugins.analysis.core.model.ResultAction plugin="warnings-ng@8.2.0"> and <edu.hm.hafner.analysis.Severity plugin="analysis-model-api@8.2.0"> .
            Hide
            drulli Ulli Hafner added a comment -

            Thanks for reporting, I forgot to provide a fall back for the field fileNames when deserializing old instances in the readResolve method of a Report.

            Show
            drulli Ulli Hafner added a comment - Thanks for reporting, I forgot to provide a fall back for the field fileNames when deserializing old instances in the readResolve method of a Report .

              People

              Assignee:
              drulli Ulli Hafner
              Reporter:
              kon Kalle Niemitalo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: