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

BuildTimeOut plugin throws NullPointerException

XMLWordPrintable

      Steps to Reproduce: [from ntulele]

      1. Enable plugin for a job
      2. Set the following:
        1. Timeout strategy: Absolute
        2. Timeout minutes: 3
        3. Time-out variable: 19
        4. Time-out actions:
          1. Abort the build
          2. Writing the build description (& enter some text)
      3. Save/Apply and attempt to execute build
      4. Note failure with stack trace per below
      5. delete "19" from the Time-out variable text box
      6. Save/Apply & re-attempt build --> PASS

      Log excerpt:

      FATAL: null
      java.lang.NullPointerException
      	at hudson.plugins.build_timeout.BuildTimeOutStrategy.hasMacros(BuildTimeOutStrategy.java:112)
      	at hudson.plugins.build_timeout.BuildTimeOutStrategy.expandAll(BuildTimeOutStrategy.java:108)
      	at hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy.getTimeOut(AbsoluteTimeOutStrategy.java:44)
      	at hudson.plugins.build_timeout.BuildTimeoutWrapper$EnvironmentImpl.<init>(BuildTimeoutWrapper.java:166)
      	at hudson.plugins.build_timeout.BuildTimeoutWrapper.setUp(BuildTimeoutWrapper.java:211)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:156)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      	at hudson.model.Run.execute(Run.java:1738)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      

      from Maciej:
      It happens probably because Action field was not set. I would expect from the plugin a minimal message saying which field should not be null if it is about invalid configuration.

            ikedam ikedam
            dzieciou Maciej Gawinecki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: