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

Latest (1.5) Clang scan-build plugin fails to publish

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: clang-scanbuild-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.595
      clang-scanbuild-plugin 1.5
      scan-build 276
    • Similar Issues:

      Description

      Publishing Clang scan-build results
      ERROR: Publisher jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher aborted due to exception
      java.lang.NullPointerException
      at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.perform(ClangScanBuildPublisher.java:120)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
      at hudson.model.Run.execute(Run.java:1784)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)

        Attachments

          Activity

          Hide
          flabrie Francis Labrie added a comment - - edited

          I get the same error, I had to go back to version 1.4.

          Xcode version is:

          $ /usr/bin/xcodebuild -version
          Xcode 6.2
          Build version 6C131e
          
          Show
          flabrie Francis Labrie added a comment - - edited I get the same error, I had to go back to version 1.4. Xcode version is: $ /usr/bin/xcodebuild -version Xcode 6.2 Build version 6C131e
          Hide
          tom_ghyselinck Tom Ghyselinck added a comment - - edited

          My console log shows

          Publishing Clang scan-build results
          Could not locate a unique scan-build output folder in: /var/hudson/workspace/MyProject/clangScanBuildReports
          ERROR: Publisher hudson.plugins.templateproject.ProxyPublisher aborted due to exception
          java.lang.NullPointerException
          	at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.perform(ClangScanBuildPublisher.java:120)
          	at hudson.plugins.templateproject.ProxyPublisher.perform(ProxyPublisher.java:71)
          	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
          	at hudson.model.Build$BuildExecution.post2(Build.java:183)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
          	at hudson.model.Run.execute(Run.java:1784)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:89)
          	at hudson.model.Executor.run(Executor.java:240)

          Using:

          • Jenkins 1.596.2 LTS
          • Clang Scan-Build Plugin 1.5
          Show
          tom_ghyselinck Tom Ghyselinck added a comment - - edited My console log shows Publishing Clang scan-build results Could not locate a unique scan-build output folder in: /var/hudson/workspace/MyProject/clangScanBuildReports ERROR: Publisher hudson.plugins.templateproject.ProxyPublisher aborted due to exception java.lang.NullPointerException at jenkins.plugins.clangscanbuild.publisher.ClangScanBuildPublisher.perform(ClangScanBuildPublisher.java:120) at hudson.plugins.templateproject.ProxyPublisher.perform(ProxyPublisher.java:71) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683) at hudson.model.Run.execute(Run.java:1784) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Using: Jenkins 1.596.2 LTS Clang Scan-Build Plugin 1.5
          Hide
          orrc Christopher Orr added a comment -

          This commit broke things by assuming that a newly-introduced config option exists in existing job configurations:
          https://github.com/jenkinsci/clang-scanbuild-plugin/commit/0fa4d64

          The workaround is to open your job config, then hit Save.

          Or, if you have ~50 jobs like we do, you can fix this programmatically via the Script Console with something like this:

          for (job in Jenkins.instance.items) {
            for (p in job.publishers) {
              if (p.value.class.simpleName.equals("ClangScanBuildPublisher")) {
                println job.name
                cs = p.value
                cs.clangexcludedpaths = ""
                job.save()
              }
            }
          }
          
          Show
          orrc Christopher Orr added a comment - This commit broke things by assuming that a newly-introduced config option exists in existing job configurations: https://github.com/jenkinsci/clang-scanbuild-plugin/commit/0fa4d64 The workaround is to open your job config, then hit Save. Or, if you have ~50 jobs like we do, you can fix this programmatically via the Script Console with something like this: for (job in Jenkins.instance.items) { for (p in job.publishers) { if (p.value. class. simpleName.equals( "ClangScanBuildPublisher" )) { println job.name cs = p.value cs.clangexcludedpaths = "" job.save() } } }
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Craig Rodrigues
          Path:
          src/main/java/jenkins/plugins/clangscanbuild/publisher/ClangScanBuildPublisher.java
          http://jenkins-ci.org/commit/clang-scanbuild-plugin/aaa7c9c25c0feee15818dd72d3da6d1829a42d2a
          Log:
          Fix null pointer exception in getClangexcludedpaths

          Suggested by: Christopher Orr, Johannes Plunien

          [FIXED JENKINS-28130]

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Craig Rodrigues Path: src/main/java/jenkins/plugins/clangscanbuild/publisher/ClangScanBuildPublisher.java http://jenkins-ci.org/commit/clang-scanbuild-plugin/aaa7c9c25c0feee15818dd72d3da6d1829a42d2a Log: Fix null pointer exception in getClangexcludedpaths Suggested by: Christopher Orr, Johannes Plunien [FIXED JENKINS-28130]

            People

            • Assignee:
              jkennedy1980 Josh Kennedy
              Reporter:
              jameshowe James Howe
            • Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: