groovy

groovy.sql.Sql printing row in closure causes java.lang.StackOverflowError

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta-2
  • Fix Version/s: 1.1-rc-2
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP running groovy 1.1-beta-2 and 1.1-beta-3 JVM: 1.6.0_02-b05
  • Testcase included:
    yes
  • Number of attachments :
    2

Description

java.lang.StackOverflowError generated by using this simple closure:

db.eachRow( 'sql select ' )  {  row -> 
  println row           //  <<== change row  to  row[0] and  java.lang.StackOverflowError will disappear
}

Test case files that will be attached deal with oracle thin client, however this is probably a generic bug.

Activity

Hide
Tom Popovich added a comment -

t.groovy_test_fails.groovy will fail with msg: Caught: java.lang.StackOverflowError

Show
Tom Popovich added a comment - t.groovy_test_fails.groovy will fail with msg: Caught: java.lang.StackOverflowError
Hide
Tom Popovich added a comment -

This passing test case has 3 chars added ( row[0] vs row ) and runs fine

Show
Tom Popovich added a comment - This passing test case has 3 chars added ( row[0] vs row ) and runs fine
Hide
Tom Popovich added a comment -

t.groovy_test_passes.groovy will run fine.

It differs in only 3 characters from the failing test. Here we use row[0] in the closure to print only the first column. If you change it to row you get a Stack Overflow.

Show
Tom Popovich added a comment - t.groovy_test_passes.groovy will run fine. It differs in only 3 characters from the failing test. Here we use row[0] in the closure to print only the first column. If you change it to row you get a Stack Overflow.
Hide
Paul King added a comment -

This appears to be fixed - awaiting confirmation from Jochen on whether some problematic code I removed was needed for other reasons.

Show
Paul King added a comment - This appears to be fixed - awaiting confirmation from Jochen on whether some problematic code I removed was needed for other reasons.
Hide
blackdrag blackdrag added a comment -

fixed

Show
blackdrag blackdrag added a comment - fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: