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

CI-Game Plug-in fails successful builds by throwing Null-pointer exception

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: ci-game-plugin
    • Labels:
      None
    • Environment:
      Windows XP, Jenkins 1.508, CI game 1.19
    • Similar Issues:

      Description

      After successful build of one axis of matrix project NullPointerException is thrown. Some rules are repeated while on other axis they are missing.
      log:
      [ci-game] evaluating rule: Build result
      [ci-game] scored: 1.0
      [ci-game] evaluating rule: Increased number of failed tests
      [ci-game] evaluating rule: Increased number of passed tests
      [ci-game] evaluating rule: Decreased number of failed tests
      [ci-game] evaluating rule: Decreased number of passed tests
      [ci-game] evaluating rule: Increased number of failed tests
      [ci-game] evaluating rule: Increased number of passed tests
      [ci-game] evaluating rule: Decreased number of failed tests
      [ci-game] evaluating rule: Decreased number of passed tests
      [ci-game] evaluating rule: Open HIGH priority tasks
      [ci-game] evaluating rule: Open HIGH priority tasks
      [ci-game] evaluating rule: Open NORMAL priority tasks
      [ci-game] evaluating rule: Open NORMAL priority tasks
      [ci-game] evaluating rule: Open LOW priority tasks
      [ci-game] evaluating rule: Open LOW priority tasks
      [ci-game] evaluating rule: Open HIGH priority tasks
      [ci-game] evaluating rule: Open NORMAL priority tasks
      [ci-game] evaluating rule: Open LOW priority tasks
      [ci-game] evaluating rule: HIGH priority PMD warnings
      [ci-game] evaluating rule: HIGH priority PMD warnings
      [ci-game] evaluating rule: NORMAL priority PMD warnings
      [ci-game] evaluating rule: NORMAL priority PMD warnings
      [ci-game] evaluating rule: LOW priority PMD warnings
      [ci-game] evaluating rule: LOW priority PMD warnings
      [ci-game] evaluating rule: HIGH priority PMD warnings
      [ci-game] evaluating rule: NORMAL priority PMD warnings
      [ci-game] evaluating rule: LOW priority PMD warnings
      [ci-game] evaluating rule: New HIGH priority Findbugs warnings
      [ci-game] evaluating rule: New NORMAL priority Findbugs warnings
      [ci-game] evaluating rule: New LOW priority Findbugs warnings
      [ci-game] evaluating rule: Fixed HIGH priority Findbugs warnings
      [ci-game] evaluating rule: Fixed NORMAL priority Findbugs warnings
      [ci-game] evaluating rule: Fixed LOW priority Findbugs warnings
      [ci-game] evaluating rule: Changed number of compiler warnings
      [ci-game] evaluating rule: Changed number of checkstyle warnings
      ERROR: Publisher hudson.plugins.cigame.GamePublisher aborted due to exception
      java.lang.NullPointerException
      at java.util.LinkedList$ListItr.next(Unknown Source)
      at hudson.plugins.cigame.model.ScoreCard.record(ScoreCard.java:121)
      at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:60)
      at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:45)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:798)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:770)
      at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
      at hudson.model.Run.execute(Run.java:1620)
      at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:237)
      Finished: FAILURE

        Attachments

          Activity

          Hide
          lkamal Kamal Mettananda added a comment - - edited

          I am also facing a NPE after all ci-game rules. However it happened after deleting some builds as well as upgrading the plugin to a latest developer codebase.

          NPE is raised from hudson.plugins.cigame.model.ScoreHistoryEntry 123 line

                public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) {
                      ScoreHistoryEntry entry = (ScoreHistoryEntry) source;
          
                      writer.startNode("score");
                      writer.setValue(String.valueOf(entry.getAwardedScore()));
                      writer.endNode();
                      writer.startNode("accountableRuns");
                      for (Run run : entry.awardingRuns) {
                          writer.startNode("run");
                          writer.setValue(run.getExternalizableId());// at this line; either run or run.getExternalizableId() is null 
                          writer.endNode();
                      }
                      writer.endNode();
                  }
          
          Show
          lkamal Kamal Mettananda added a comment - - edited I am also facing a NPE after all ci-game rules. However it happened after deleting some builds as well as upgrading the plugin to a latest developer codebase. NPE is raised from hudson.plugins.cigame.model.ScoreHistoryEntry 123 line public void marshal( Object source, HierarchicalStreamWriter writer, MarshallingContext context) { ScoreHistoryEntry entry = (ScoreHistoryEntry) source; writer.startNode( "score" ); writer.setValue( String .valueOf(entry.getAwardedScore())); writer.endNode(); writer.startNode( "accountableRuns" ); for (Run run : entry.awardingRuns) { writer.startNode( "run" ); writer.setValue(run.getExternalizableId()); // at this line; either run or run.getExternalizableId() is null writer.endNode(); } writer.endNode(); }
          Hide
          lkamal Kamal Mettananda added a comment -

          More details about the NPE.

          00:01:31.230 [ci-game] evaluating rule: PMD violation
          00:01:31.255 [ci-game] evaluating rule: pylint violation
          00:01:31.255 [ci-game] evaluating rule: CPD violation
          00:01:31.255 [ci-game] evaluating rule: Checkstyle violation
          00:01:31.255 [ci-game] evaluating rule: FindBugs violation
          00:01:31.255 [ci-game] evaluating rule: FXCop violation
          00:01:31.255 [ci-game] evaluating rule: Simian violation
          00:01:31.255 [ci-game] evaluating rule: StyleCop violation
          00:01:31.255 [ci-game] evaluating rule: HIGH priority PMD warnings
          00:01:31.256 [ci-game] evaluating rule: NORMAL priority PMD warnings
          00:01:31.257 [ci-game] evaluating rule: LOW priority PMD warnings
          00:01:31.257 [ci-game] evaluating rule: New HIGH priority Findbugs warnings
          00:01:31.258 [ci-game] evaluating rule: New NORMAL priority Findbugs warnings
          00:01:31.258 [ci-game] evaluating rule: New LOW priority Findbugs warnings
          00:01:31.258 [ci-game] evaluating rule: Fixed HIGH priority Findbugs warnings
          00:01:31.258 [ci-game] evaluating rule: Fixed NORMAL priority Findbugs warnings
          00:01:31.258 [ci-game] evaluating rule: Fixed LOW priority Findbugs warnings
          00:01:31.258 [ci-game] evaluating rule: Changed number of compiler warnings
          00:01:31.259 [ci-game] evaluating rule: Changed number of checkstyle warnings
          00:01:31.299 ERROR: Publisher hudson.plugins.cigame.GamePublisher aborted due to exception
          00:01:31.300 java.lang.RuntimeException: Failed to serialize hudson.model.User#properties for class hudson.model.User
          00:01:31.300 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:208)
          00:01:31.300 	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:176)
          00:01:31.300 	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:135)
          00:01:31.300 	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:161)
          00:01:31.300 	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:102)
          00:01:31.300 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          00:01:31.300 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          00:01:31.300 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          00:01:31.300 	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
          00:01:31.300 	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
          00:01:31.300 	at com.thoughtworks.xstream.XStream.marshal(XStream.java:898)
          00:01:31.300 	at com.thoughtworks.xstream.XStream.marshal(XStream.java:887)
          00:01:31.300 	at com.thoughtworks.xstream.XStream.toXML(XStream.java:860)
          00:01:31.300 	at hudson.XmlFile.write(XmlFile.java:183)
          00:01:31.300 	at hudson.model.User.save(User.java:500)
          00:01:31.300 	at hudson.plugins.cigame.GamePublisher.updateUserScores(GamePublisher.java:109)
          00:01:31.300 	at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:85)
          00:01:31.300 	at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:45)
          00:01:31.300 	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
          00:01:31.300 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781)
          00:01:31.300 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:753)
          00:01:31.300 	at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
          00:01:31.300 	at hudson.model.Run.execute(Run.java:1710)
          00:01:31.300 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          00:01:31.300 	at hudson.model.ResourceController.execute(ResourceController.java:88)
          00:01:31.300 	at hudson.model.Executor.run(Executor.java:246)
          00:01:31.301 Caused by: java.lang.RuntimeException: Failed to serialize hudson.plugins.cigame.UserScoreProperty#scoreHistoryEntries for class hudson.plugins.cigame.UserScoreProperty
          00:01:31.301 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:208)
          00:01:31.301 	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:176)
          00:01:31.301 	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:135)
          00:01:31.301 	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:161)
          00:01:31.301 	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:102)
          00:01:31.301 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          00:01:31.301 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          00:01:31.301 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          00:01:31.301 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
          00:01:31.301 	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
          00:01:31.301 	at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55)
          00:01:31.301 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          00:01:31.301 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          00:01:31.301 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          00:01:31.301 	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:217)
          00:01:31.301 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:204)
          00:01:31.301 	... 25 more
          00:01:31.301 Caused by: java.lang.NullPointerException
          00:01:31.301 	at hudson.plugins.cigame.model.ScoreHistoryEntry$ConverterImpl.marshal(ScoreHistoryEntry.java:123)
          00:01:31.301 	at hudson.util.XStream2$AssociatedConverterImpl.marshal(XStream2.java:334)
          00:01:31.301 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          00:01:31.301 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          00:01:31.301 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          00:01:31.301 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
          00:01:31.301 	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
          00:01:31.301 	at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55)
          00:01:31.301 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          00:01:31.301 	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          00:01:31.301 	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          00:01:31.301 	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:217)
          00:01:31.301 	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:204)
          00:01:31.301 	... 40 more
          00:01:31.304 Finished: FAILURE
          
          Show
          lkamal Kamal Mettananda added a comment - More details about the NPE. 00:01:31.230 [ci-game] evaluating rule: PMD violation 00:01:31.255 [ci-game] evaluating rule: pylint violation 00:01:31.255 [ci-game] evaluating rule: CPD violation 00:01:31.255 [ci-game] evaluating rule: Checkstyle violation 00:01:31.255 [ci-game] evaluating rule: FindBugs violation 00:01:31.255 [ci-game] evaluating rule: FXCop violation 00:01:31.255 [ci-game] evaluating rule: Simian violation 00:01:31.255 [ci-game] evaluating rule: StyleCop violation 00:01:31.255 [ci-game] evaluating rule: HIGH priority PMD warnings 00:01:31.256 [ci-game] evaluating rule: NORMAL priority PMD warnings 00:01:31.257 [ci-game] evaluating rule: LOW priority PMD warnings 00:01:31.257 [ci-game] evaluating rule: New HIGH priority Findbugs warnings 00:01:31.258 [ci-game] evaluating rule: New NORMAL priority Findbugs warnings 00:01:31.258 [ci-game] evaluating rule: New LOW priority Findbugs warnings 00:01:31.258 [ci-game] evaluating rule: Fixed HIGH priority Findbugs warnings 00:01:31.258 [ci-game] evaluating rule: Fixed NORMAL priority Findbugs warnings 00:01:31.258 [ci-game] evaluating rule: Fixed LOW priority Findbugs warnings 00:01:31.258 [ci-game] evaluating rule: Changed number of compiler warnings 00:01:31.259 [ci-game] evaluating rule: Changed number of checkstyle warnings 00:01:31.299 ERROR: Publisher hudson.plugins.cigame.GamePublisher aborted due to exception 00:01:31.300 java.lang.RuntimeException: Failed to serialize hudson.model.User#properties for class hudson.model.User 00:01:31.300 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:208) 00:01:31.300 at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:176) 00:01:31.300 at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:135) 00:01:31.300 at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:161) 00:01:31.300 at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:102) 00:01:31.300 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) 00:01:31.300 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) 00:01:31.300 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) 00:01:31.300 at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) 00:01:31.300 at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) 00:01:31.300 at com.thoughtworks.xstream.XStream.marshal(XStream.java:898) 00:01:31.300 at com.thoughtworks.xstream.XStream.marshal(XStream.java:887) 00:01:31.300 at com.thoughtworks.xstream.XStream.toXML(XStream.java:860) 00:01:31.300 at hudson.XmlFile.write(XmlFile.java:183) 00:01:31.300 at hudson.model.User.save(User.java:500) 00:01:31.300 at hudson.plugins.cigame.GamePublisher.updateUserScores(GamePublisher.java:109) 00:01:31.300 at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:85) 00:01:31.300 at hudson.plugins.cigame.GamePublisher.perform(GamePublisher.java:45) 00:01:31.300 at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) 00:01:31.300 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781) 00:01:31.300 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:753) 00:01:31.300 at hudson.model.Build$BuildExecution.cleanUp(Build.java:192) 00:01:31.300 at hudson.model.Run.execute(Run.java:1710) 00:01:31.300 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 00:01:31.300 at hudson.model.ResourceController.execute(ResourceController.java:88) 00:01:31.300 at hudson.model.Executor.run(Executor.java:246) 00:01:31.301 Caused by: java.lang.RuntimeException: Failed to serialize hudson.plugins.cigame.UserScoreProperty#scoreHistoryEntries for class hudson.plugins.cigame.UserScoreProperty 00:01:31.301 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:208) 00:01:31.301 at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:176) 00:01:31.301 at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:135) 00:01:31.301 at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:161) 00:01:31.301 at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:102) 00:01:31.301 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) 00:01:31.301 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) 00:01:31.301 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) 00:01:31.301 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) 00:01:31.301 at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) 00:01:31.301 at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55) 00:01:31.301 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) 00:01:31.301 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) 00:01:31.301 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) 00:01:31.301 at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:217) 00:01:31.301 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:204) 00:01:31.301 ... 25 more 00:01:31.301 Caused by: java.lang.NullPointerException 00:01:31.301 at hudson.plugins.cigame.model.ScoreHistoryEntry$ConverterImpl.marshal(ScoreHistoryEntry.java:123) 00:01:31.301 at hudson.util.XStream2$AssociatedConverterImpl.marshal(XStream2.java:334) 00:01:31.301 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) 00:01:31.301 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) 00:01:31.301 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) 00:01:31.301 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) 00:01:31.301 at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) 00:01:31.301 at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55) 00:01:31.301 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) 00:01:31.301 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) 00:01:31.301 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) 00:01:31.301 at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:217) 00:01:31.301 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:204) 00:01:31.301 ... 40 more 00:01:31.304 Finished: FAILURE

            People

            • Assignee:
              redsolo redsolo
              Reporter:
              jchorko Janusz Chorko
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: