Groovy
  1. Groovy
  2. GROOVY-3109

StackOverflowError with DOMCategory and missing property

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.5.7, 1.6-beta-2
    • Fix Version/s: 1.6-rc-1, 1.7-beta-1
    • Component/s: None
    • Labels:
      None

      Description

      Run the attached script to see the bug in action. It seems getProperty() and DOMCategory.get() end up in an infinite loop. This is a serious problem for Gant since it means that you basically can't use categories in Gant scripts.

        Issue Links

          Activity

          Hide
          Peter Ledbrook added a comment -

          I just tried the same example with org.codehaus.groovy.runtime.TimeCategory instead and that worked fine, so it looks like a problem with DOMCategory alone.

          Show
          Peter Ledbrook added a comment - I just tried the same example with org.codehaus.groovy.runtime.TimeCategory instead and that worked fine, so it looks like a problem with DOMCategory alone.
          Hide
          Russel Winder added a comment -

          Also affects Subversion Head (aka 1.7-beta-1-SNAPSHOT).

          Show
          Russel Winder added a comment - Also affects Subversion Head (aka 1.7-beta-1-SNAPSHOT).
          Hide
          Guillaume Delcroix added a comment -

          Even just this fails, without any property in the gstring:

          import groovy.xml.dom.DOMCategory
          
          use(DOMCategory) {
              println "foo"
          }
          
          Show
          Guillaume Delcroix added a comment - Even just this fails, without any property in the gstring: import groovy.xml.dom.DOMCategory use(DOMCategory) { println "foo" }
          Hide
          Guillaume Delcroix added a comment -
          import groovy.xml.dom.DOMCategory
          
          use(DOMCategory) {
              test
          }
          

          was failing too

          Show
          Guillaume Delcroix added a comment - import groovy.xml.dom.DOMCategory use(DOMCategory) { test } was failing too
          Hide
          Guillaume Delcroix added a comment -

          This is fixed in 1.6 and 1.7.
          But it seems the same fix can't be applied to 1.5 without generating some new test failures.

          Show
          Guillaume Delcroix added a comment - This is fixed in 1.6 and 1.7. But it seems the same fix can't be applied to 1.5 without generating some new test failures.
          Hide
          Jochen Theodorou added a comment -

          I close this bug as the fix is now in 1.5.8 too

          Show
          Jochen Theodorou added a comment - I close this bug as the fix is now in 1.5.8 too
          Hide
          James P. White added a comment -

          Applying this fix breaks the 1.5 build on JDK 1.4.

          http://bamboo.ci.codehaus.org/browse/GROOVY-GROOVY-611

          Show
          James P. White added a comment - Applying this fix breaks the 1.5 build on JDK 1.4. http://bamboo.ci.codehaus.org/browse/GROOVY-GROOVY-611
          Hide
          Jochen Theodorou added a comment -

          I created GROOVY-3220 as a clone for 1.5.x of this bug. Since it works on 1.7/1.6 it might very well be not really related to the patch, but to a problem uncovered by the patch. Anyway, it may be needed to divert from the path taken for 1.7/1.6 so we should protocol thatin the other issue

          Show
          Jochen Theodorou added a comment - I created GROOVY-3220 as a clone for 1.5.x of this bug. Since it works on 1.7/1.6 it might very well be not really related to the patch, but to a problem uncovered by the patch. Anyway, it may be needed to divert from the path taken for 1.7/1.6 so we should protocol thatin the other issue
          Hide
          James P. White added a comment -

          Merged the changes for GROOVY-3220 into the trunk. Will do for 1.6 if no complaints.

          Show
          James P. White added a comment - Merged the changes for GROOVY-3220 into the trunk. Will do for 1.6 if no complaints.
          Hide
          James P. White added a comment -

          Your comment in 3220 didn't sound like a complaint about my change, so I've merged it into 1.6.

          Show
          James P. White added a comment - Your comment in 3220 didn't sound like a complaint about my change, so I've merged it into 1.6.

            People

            • Assignee:
              Guillaume Delcroix
              Reporter:
              Peter Ledbrook
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development