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

NullPointerException after changing warning source

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: analysis-core-plugin
    • Labels:
      None
    • Environment:
      Master on Fedora 17, slave on Windows XP
    • Similar Issues:

      Description

      I recently ran into some issues with Jenkins timing out if the console log is inactive for too long. I originally had a job with command similar to "make >build.log 2>&1" with a warning publisher tied to that "build.log" file. I changed the job command to simply "make" and modified the job to search for warnings on the console log rather than the old log file. The build itself completes fine, but the final job steps produce an exception.

      It seems like this may be because the job has older builds with identical warning category but different warning source, but haven't looked too much into it. A segment of the log containing the error is below:

      [WARNINGS] Parsing warnings in console log with parser GNU Make + GNU Compiler (gcc)
      ERROR: Publisher hudson.plugins.warnings.WarningsPublisher aborted due to exception
      java.lang.NullPointerException
      at hudson.plugins.analysis.util.model.AbstractAnnotation.equals(AbstractAnnotation.java:499)
      at com.google.common.collect.RegularImmutableSet.contains(RegularImmutableSet.java:54)
      at java.util.AbstractSet.removeAll(AbstractSet.java:176)
      at hudson.plugins.analysis.core.AnnotationDifferencer.difference(AnnotationDifferencer.java:43)
      at hudson.plugins.analysis.core.AnnotationDifferencer.getNewAnnotations(AnnotationDifferencer.java:27)
      at hudson.plugins.analysis.core.BuildResult.initialize(BuildResult.java:261)
      at hudson.plugins.analysis.core.BuildResult.<init>(BuildResult.java:215)
      at hudson.plugins.warnings.WarningsResult.<init>(WarningsResult.java:52)
      at hudson.plugins.warnings.WarningsResult.<init>(WarningsResult.java:46)
      at hudson.plugins.warnings.WarningsPublisher.annotate(WarningsPublisher.java:406)
      at hudson.plugins.warnings.WarningsPublisher.parseConsoleLog(WarningsPublisher.java:365)
      at hudson.plugins.warnings.WarningsPublisher.perform(WarningsPublisher.java:276)
      at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:289)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      ...

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/analysis/util/model/AbstractAnnotation.java
            http://jenkins-ci.org/commit/analysis-core-plugin/d6eae84f2d212b29fba28116bc8a4f2a26dedac3
            Log:
            [FIXED JENKINS-15250]: Don't use raw data when comparing warnings.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/util/model/AbstractAnnotation.java http://jenkins-ci.org/commit/analysis-core-plugin/d6eae84f2d212b29fba28116bc8a4f2a26dedac3 Log: [FIXED JENKINS-15250] : Don't use raw data when comparing warnings.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/test/java/hudson/plugins/warnings/parser/WarningTest.java
            http://jenkins-ci.org/commit/warnings-plugin/5fb9ddff3a6965037b6cdcca77542cd1fa3c7d00
            Log:
            JENKINS-15250: Added test case to show NPE when comparing warnings.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/java/hudson/plugins/warnings/parser/WarningTest.java http://jenkins-ci.org/commit/warnings-plugin/5fb9ddff3a6965037b6cdcca77542cd1fa3c7d00 Log: JENKINS-15250 : Added test case to show NPE when comparing warnings.
            Hide
            drulli Ulli Hafner added a comment -

            Integrated in Jenkins Analysis Plug-ins (Compile) #609
            [FIXED JENKINS-15250]: Don't use raw data when comparing warnings. (Revision d6eae84f2d212b29fba28116bc8a4f2a26dedac3)

            Result = SUCCESS

            Show
            drulli Ulli Hafner added a comment - Integrated in Jenkins Analysis Plug-ins (Compile) #609 [FIXED JENKINS-15250] : Don't use raw data when comparing warnings. (Revision d6eae84f2d212b29fba28116bc8a4f2a26dedac3) Result = SUCCESS

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                bsipos Brian Sipos
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: