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

NPE from IteratorHack.writeReplace via ParamsVariable.getValue

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: workflow-cps-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.48
      Pipeline 2.5
      Pipeline Groovy 2.28
      no Parameter Separator installed.
    • Similar Issues:

      Description

      After Jenkins 2.46->2.48 with plugin update to newest.

      Jenkins 2.48
      Pipeline 2.5
      Pipeline Groovy 2.28
      no Parameter Separator installed.

      java.lang.NullPointerException
      	at org.jenkinsci.plugins.workflow.cps.persistence.IteratorHack.writeReplace(IteratorHack.java:52)
      	at org.jenkinsci.plugins.workflow.cps.ParamsVariable.addValue(ParamsVariable.java:88)
      	at org.jenkinsci.plugins.workflow.cps.ParamsVariable.getValue(ParamsVariable.java:66)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.getProperty(CpsScript.java:121)
      	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
      	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:456)
      	at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:243)
      	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:52)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:308)
      	at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
      	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
      	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:28)
      	at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
      	at Script1.checkParameters(Script1.groovy:469)
      	at Script1.runPipeline(Script1.groovy:84)
      	at ___cps.transform___(Native Method)
      	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:74)
      	at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
      	at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
      	at sun.reflect.GeneratedMethodAccessor467.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      	at com.cloudbees.groovy.cps.Next.step(Next.java:74)
      	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
      	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
      	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:165)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:328)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240)
      	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228)
      	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      	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:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Issue Links

            Activity

            heikkisi Heikki Simperi created issue -
            heikkisi Heikki Simperi made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-41712 [ JENKINS-41712 ]
            heikkisi Heikki Simperi made changes -
            Summary NullPointerException org.jenkinsci.plugins.workflow.cps.ParamsVariable.getValue Groovy params.containsKey() NullPointerException org.jenkinsci.plugins.workflow.cps.ParamsVariable.getValue
            heikkisi Heikki Simperi made changes -
            Priority Major [ 3 ] Minor [ 4 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-cps-plugin [ 21713 ]
            Component/s groovy-plugin [ 15549 ]
            abayer Andrew Bayer made changes -
            Assignee vjuranek [ vjuranek ] Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Component/s pipeline [ 21692 ]
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Summary Groovy params.containsKey() NullPointerException org.jenkinsci.plugins.workflow.cps.ParamsVariable.getValue NPE from IteratorHack.writeReplace via ParamsVariable.getValue
            jglick Jesse Glick made changes -
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 112 (Web Link)" [ 15516 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-43511 [ JENKINS-43511 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                heikkisi Heikki Simperi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: