Project

Profile

Help

Bug #2571

Updated by Michael Kay almost 9 years ago

Reported by Hans-Juergen Rennau in email to MHK. The query: 

 let $doc := doc('problem-input.xml') 
 let $targets :=  
     for $xincludeGroup in $doc//xi:include 
     group by $href := $xincludeGroup/@href 
     order by $href 
     return <target href="{$href}"/> 
 return 
     <targets>{$targets}</targets> 

 fails with: 

 java.lang.ArrayIndexOutOfBoundsException: Local variable $xincludeGroup $x... has not been allocated a stack frame slot 
	 at net.sf.saxon.expr.LocalVariableReference.evaluateVariable(LocalVariableReference.java:114) 
	 at net.sf.saxon.expr.flwor.TupleExpression.evaluateItem(TupleExpression.java:122) 
	 at net.sf.saxon.expr.flwor.OrderByClausePush.processTuple(OrderByClausePush.java:50) 
	 at net.sf.saxon.expr.flwor.GroupByClausePush.close(GroupByClausePush.java:100) 
	 at net.sf.saxon.expr.flwor.LetClausePush.close(LetClausePush.java:44) 
	 at net.sf.saxon.expr.flwor.ForClausePush.close(ForClausePush.java:53) 

 The problem occurs in the latest 9.6 build but not in 9.7 

Back