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

StackOverflowError in Jenkins 2.0 with Simple Parameterized Builds Report

      On Jenkins 2.0, when running the Parameterized Builds Report on a project I get an error page showing a StackOverflowError. This does not occur on Jenkins 1.653.
      As Jenkins 2.0 claims to be fully compatible it might be as well Jenkins or the plugin that needs to be fixed.

          [JENKINS-34525] StackOverflowError in Jenkins 2.0 with Simple Parameterized Builds Report

          Jesse Glick added a comment -

          JENKINS-14044 reports a similar error, though with 1.x.

          Jesse Glick added a comment - JENKINS-14044 reports a similar error, though with 1.x.

          Daniel Beck added a comment -

          Applies to a matrix project, not freestyle.

          I was able to reproduce this using freestyle by accessing the action on the parameterized job.

          Daniel Beck added a comment - Applies to a matrix project, not freestyle. I was able to reproduce this using freestyle by accessing the action on the parameterized job.

          Jesse Glick added a comment -

          It seems to be a Groovy bug, but one triggered by plugin code that can be easily changed: do not attempt to use AbstractBuild (or other Job or Run subtypes) as a parameter type in a local method definition in a Groovy view.

          Jesse Glick added a comment - It seems to be a Groovy bug, but one triggered by plugin code that can be easily changed: do not attempt to use AbstractBuild (or other Job or Run subtypes) as a parameter type in a local method definition in a Groovy view.

          Jesse Glick added a comment -

          Also reproduces with a parameterized freestyle project.

          Jesse Glick added a comment - Also reproduces with a parameterized freestyle project.

          Jesse Glick added a comment -

          To test against 2.0 it is convenient to use:

          diff --git a/pom.xml b/pom.xml
          index dee96bd..d363092 100644
          --- a/pom.xml
          +++ b/pom.xml
          @@ -4,7 +4,7 @@
               <parent>
                   <groupId>org.jenkins-ci.plugins</groupId>
                   <artifactId>plugin</artifactId>
          -        <version>1.447</version>
          +        <version>2.7</version>
               </parent>
           
               <artifactId>simple-parameterized-builds-report</artifactId>
          @@ -26,8 +26,15 @@
                   <developerConnection>scm:git:ssh://git@github.com/nullin/simple-parameterized-builds-report.git</developerConnection>
                   <url>https://github.com/nullin/simple-parameterized-builds-report</url>
               </scm>
          -
          +    <dependencies>
          +        <dependency>
          +            <groupId>${project.groupId}</groupId>
          +            <artifactId>matrix-project</artifactId>
          +            <version>1.6</version>
          +        </dependency>
          +    </dependencies>
               <properties>
          +        <jenkins.version>2.0</jenkins.version>
                   <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
                   <project.build.outputEncoding>UTF-8</project.build.outputEncoding>
                   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
          

          Jesse Glick added a comment - To test against 2.0 it is convenient to use: diff --git a/pom.xml b/pom.xml index dee96bd..d363092 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ <parent> <groupId> org.jenkins-ci.plugins </groupId> <artifactId> plugin </artifactId> - <version> 1.447 </version> + <version> 2.7 </version> </parent> <artifactId> simple-parameterized-builds-report </artifactId> @@ -26,8 +26,15 @@ <developerConnection> scm:git:ssh://git@github.com/nullin/simple-parameterized-builds-report.git </developerConnection> <url> https://github.com/nullin/simple-parameterized-builds-report </url> </scm> - + <dependencies> + <dependency> + <groupId> ${project.groupId} </groupId> + <artifactId> matrix-project </artifactId> + <version> 1.6 </version> + </dependency> + </dependencies> <properties> + <jenkins.version> 2.0 </jenkins.version> <project.reporting.outputEncoding> UTF-8 </project.reporting.outputEncoding> <project.build.outputEncoding> UTF-8 </project.build.outputEncoding> <project.build.sourceEncoding> UTF-8 </project.build.sourceEncoding>

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/resources/com/nullin/jenkins/spbr/MatrixBuildsReportAction/index.groovy
          src/main/resources/com/nullin/jenkins/spbr/SimpleParameterizedBuildsReportAction/index.groovy
          http://jenkins-ci.org/commit/simple-parameterized-builds-report-plugin/43bd879bca7d35315f0d2ae31228d1e95099597e
          Log:
          [FIXED JENKINS-34525] Work around Groovy compiler bug.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/resources/com/nullin/jenkins/spbr/MatrixBuildsReportAction/index.groovy src/main/resources/com/nullin/jenkins/spbr/SimpleParameterizedBuildsReportAction/index.groovy http://jenkins-ci.org/commit/simple-parameterized-builds-report-plugin/43bd879bca7d35315f0d2ae31228d1e95099597e Log: [FIXED JENKINS-34525] Work around Groovy compiler bug.

          Code changed in jenkins
          User: Nalin Makar
          Path:
          src/main/resources/com/nullin/jenkins/spbr/MatrixBuildsReportAction/index.groovy
          src/main/resources/com/nullin/jenkins/spbr/SimpleParameterizedBuildsReportAction/index.groovy
          http://jenkins-ci.org/commit/simple-parameterized-builds-report-plugin/7c27018d885d9882c04bebc0c75cde1248486a6b
          Log:
          Merge pull request #2 from jglick/Groovy-error-JENKINS-34525

          JENKINS-34525 Work around Groovy bug in Jenkins 2

          Compare: https://github.com/jenkinsci/simple-parameterized-builds-report-plugin/compare/96f0af251088...7c27018d885d

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nalin Makar Path: src/main/resources/com/nullin/jenkins/spbr/MatrixBuildsReportAction/index.groovy src/main/resources/com/nullin/jenkins/spbr/SimpleParameterizedBuildsReportAction/index.groovy http://jenkins-ci.org/commit/simple-parameterized-builds-report-plugin/7c27018d885d9882c04bebc0c75cde1248486a6b Log: Merge pull request #2 from jglick/Groovy-error- JENKINS-34525 JENKINS-34525 Work around Groovy bug in Jenkins 2 Compare: https://github.com/jenkinsci/simple-parameterized-builds-report-plugin/compare/96f0af251088...7c27018d885d

          Hiran Chaudhuri added a comment - - edited

          Thank you for the quick reaction.
          I confirm using Jenkins 2.2 and the Simple Parameterized Build Plugin 1.5 the issue is fixed.

          Hiran Chaudhuri added a comment - - edited Thank you for the quick reaction. I confirm using Jenkins 2.2 and the Simple Parameterized Build Plugin 1.5 the issue is fixed.

          I confirm the problem no longer occurs. Thank you.

          Hiran Chaudhuri added a comment - I confirm the problem no longer occurs. Thank you.

          This has been reported as GROOVY-7826 and also affects Script Console, a simple script like def foo(Run r) {} will not run.

          Daniel Spilker added a comment - This has been reported as GROOVY-7826 and also affects Script Console, a simple script like def foo(Run r) { } will not run.

            jglick Jesse Glick
            hiran_chaudhuri Hiran Chaudhuri
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: