-TP option use works with XQuery and Saxon 10.1 HE but gives error ArrayIndexOutOfBoundsException with EE
Added by Martin Honnen over 4 years ago
I was trying to use the -TP
option, strangely for Saxon 10.1 HE it works with XQuery but for EE I get an error
java.lang.ArrayIndexOutOfBoundsException: Local variable $vv:v0 uses slot 0 but no slots are allocated on the stack frame
Full command line and error output:
PS C:\Users\marti\SomeFolder\for-each-pair> java -cp 'C:\Program Files\Saxonica\SaxonEE10-1J\saxon-ee-10.1.jar' net.sf.saxon.Query -TP:saxonee101-for-each-pair-prof1.html matrix-addition-1.xq
java.lang.ArrayIndexOutOfBoundsException: Local variable $vv:v0 uses slot 0 but no slots are allocated on the stack frame
at net.sf.saxon.expr.LocalVariableReference.evaluateVariable(LocalVariableReference.java:130)
at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:555)
at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:453)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:136)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:346)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:292)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:136)
at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:485)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:136)
at net.sf.saxon.expr.instruct.ComponentTracer.processLeavingTail(ComponentTracer.java:150)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:136)
at net.sf.saxon.expr.instruct.ComponentTracer.processLeavingTail(ComponentTracer.java:150)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:736)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:136)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:346)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:292)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:136)
at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:643)
at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:365)
at net.sf.saxon.expr.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:655)
at net.sf.saxon.expr.instruct.GlobalVariable.actuallyEvaluate(GlobalVariable.java:738)
at net.sf.saxon.expr.instruct.GlobalParam.evaluateVariable(GlobalParam.java:92)
at net.sf.saxon.Controller.preEvaluateGlobals(Controller.java:1374)
at net.sf.saxon.Controller.initializeController(Controller.java:1147)
at net.sf.saxon.query.DynamicQueryContext.initializeController(DynamicQueryContext.java:443)
at com.saxonica.ee.optim.XQueryExpressionEE.newController(XQueryExpressionEE.java:228)
at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:420)
at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:370)
at net.sf.saxon.Query.runQuery(Query.java:895)
at net.sf.saxon.Query.doQuery(Query.java:423)
at net.sf.saxon.Query.main(Query.java:97)
Fatal error during query: java.lang.ArrayIndexOutOfBoundsException: Local variable $vv:v0 uses slot 0 but no slots are allocated on the stack frame
The code runs fine with EE if I don't use the -TP
option.
I will attach the query.
matrix-addition-1.xq (1.26 KB) matrix-addition-1.xq |
Replies (3)
Please register to reply
RE: -TP option use works with XQuery and Saxon 10.1 HE but gives error ArrayIndexOutOfBoundsException with EE - Added by Martin Honnen over 4 years ago
With EE 10.0 I get a similar stack trace when trying to use -TP
, for EE 9.9 the option works flawlessly.
RE: -TP option use works with XQuery and Saxon 10.1 HE but gives error ArrayIndexOutOfBoundsException with EE - Added by Michael Kay over 4 years ago
Thanks, we'l look into it. Likely cause is that the trace instructions injected into the expression tree are confusing the optimizer in some way.
RE: -TP option use works with XQuery and Saxon 10.1 HE but gives error ArrayIndexOutOfBoundsException with EE - Added by Michael Kay over 4 years ago
Problem reproduced. There's a lot of function inlining revealed by the -explain output, and that would appear to be where things are going wrong.
Please register to reply