Internal error in Saxon-HE-9.7.0-5
Added by Vladimir Nesterovsky over 8 years ago
I've run into internal error in Saxon-HE-9.7.0-5. Right now please look into a stack trace, and later I'll try to get some repro:
Exception in thread "main" java.lang.RuntimeException: Internal error evaluating template rule at line 49 in module ... at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:402) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.trans.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:65) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:433) at net.sf.saxon.Controller.transformDocument(Controller.java:2270) at net.sf.saxon.Controller.transform(Controller.java:1847) at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:579) at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:185) ... Caused by: java.lang.RuntimeException: Internal error evaluating template rule at line 132 in module ... at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:402) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:567) at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:356) at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:410) at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:833) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.LetExpression.process(LetExpression.java:559) at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:450) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:283) at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:354) at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:410) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:389) ... 11 more Caused by: java.lang.RuntimeException: Internal error evaluating template rule at line 135 in module ... at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:402) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296) at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249) ... at net.sf.saxon.functions.IntegratedFunctionCall.iterate(IntegratedFunctionCall.java:283) at net.sf.saxon.expr.Expression.process(Expression.java:878) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:389) ... 26 more Caused by: java.lang.RuntimeException: Internal error evaluating template rule at line 434 in module ... at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:402) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296) at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:253) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:708) at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:833) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:364) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:311) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:364) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:311) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:283) at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:354) at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:671) at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:354) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:277) at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:194) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:491) at net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:447) at net.sf.saxon.expr.instruct.ForEach.map(ForEach.java:485) at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:61) at net.sf.saxon.value.SequenceExtent.(SequenceExtent.java:86) at net.sf.saxon.value.SequenceExtent.makeSequenceExtent(SequenceExtent.java:110) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:313) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:491) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:699) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.ItemChecker.process(ItemChecker.java:234) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:285) at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:354) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:323) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:491) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:699) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:708) at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:833) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:389) ... 35 more Caused by: java.lang.RuntimeException: Internal error evaluating template rule at line 2681 in module ... at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:402) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:567) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:387) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296) at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:364) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:311) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:364) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:311) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:708) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:389) ... 78 more Caused by: java.lang.ClassCastException: net.sf.saxon.expr.instruct.UserFunction cannot be cast to net.sf.saxon.trans.Mode at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:259) at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249) at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:671) at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:354) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:277) at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:194) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.instruct.LocalParam.getSelectValue(LocalParam.java:382) at net.sf.saxon.expr.instruct.LocalParamSetter.processLeavingTail(LocalParamSetter.java:280) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.CardinalityChecker.process(CardinalityChecker.java:320) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:391) ... 91 more
Thanks
Replies (15)
Please register to reply
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Vladimir Nesterovsky over 8 years ago
More info on subject. While trying to simplify the test case I've started to get different error:
java.lang.IndexOutOfBoundsException: Index: 92, Size: 7 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:690) at net.sf.saxon.expr.UserFunctionCall.getTargetComponent(UserFunctionCall.java:561) at net.sf.saxon.expr.UserFunctionCall.callFunction(UserFunctionCall.java:493) at net.sf.saxon.expr.UserFunctionCall.evaluateItem(UserFunctionCall.java:451) at net.sf.saxon.expr.LetExpression.evaluateItem(LetExpression.java:512) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.instruct.LocalParam.getSelectValue(LocalParam.java:382) at net.sf.saxon.expr.instruct.LocalParamSetter.processLeavingTail(LocalParamSetter.java:280) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.CardinalityChecker.process(CardinalityChecker.java:320) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:285) at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:510) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:151) at net.sf.saxon.expr.ItemChecker.process(ItemChecker.java:234) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:391) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296) at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249) at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:671) at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:354) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:277) at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:194) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:491) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:699) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:389) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296) at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:253) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:708) at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:833) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:364) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:311) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:364) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:311) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:283) at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:354) at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:671) at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:354) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:277) at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:194) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:491) at net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:447) at net.sf.saxon.expr.instruct.ForEach.map(ForEach.java:485) at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:61) at net.sf.saxon.value.SequenceExtent.(SequenceExtent.java:86) at net.sf.saxon.value.SequenceExtent.makeSequenceExtent(SequenceExtent.java:110) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:313) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:491) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:699) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.CardinalityChecker.process(CardinalityChecker.java:320) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:285) at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:510) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:298) at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249) ... at net.sf.saxon.functions.IntegratedFunctionCall.iterate(IntegratedFunctionCall.java:283) at net.sf.saxon.expr.Expression.process(Expression.java:878) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:389) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:567) at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:356) at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:410) at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:833) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.LetExpression.process(LetExpression.java:559) at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:450) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:283) at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:510) at net.sf.saxon.trans.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:67) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:433) at net.sf.saxon.Controller.transformDocument(Controller.java:2270) at net.sf.saxon.Controller.transform(Controller.java:1847) at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:579) at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:185) ... Exception in thread "main" java.lang.RuntimeException: Internal error evaluating template rule at line 132 in module ... at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:402) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:567) at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:356) at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:410) at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:833) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.LetExpression.process(LetExpression.java:559) at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:450) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:283) at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:510) at net.sf.saxon.trans.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:67) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:433) at net.sf.saxon.Controller.transformDocument(Controller.java:2270) at net.sf.saxon.Controller.transform(Controller.java:1847) at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:579) at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:185) ... Caused by: java.lang.RuntimeException: Internal error evaluating template rule at line 959 in module ... at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:402) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296) at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:253) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:708) at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:833) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:364) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:311) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:364) at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:311) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:283) at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:354) at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:671) at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:354) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:277) at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:194) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:491) at net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:447) at net.sf.saxon.expr.instruct.ForEach.map(ForEach.java:485) at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:61) at net.sf.saxon.value.SequenceExtent.(SequenceExtent.java:86) at net.sf.saxon.value.SequenceExtent.makeSequenceExtent(SequenceExtent.java:110) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:313) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:491) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:699) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.CardinalityChecker.process(CardinalityChecker.java:320) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:285) at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:510) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:298) at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249) ... at net.sf.saxon.functions.IntegratedFunctionCall.iterate(IntegratedFunctionCall.java:283) at net.sf.saxon.expr.Expression.process(Expression.java:878) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:656) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:389) ... 22 more Caused by: java.lang.RuntimeException: Internal error evaluating template rule at line 2760 in module ... at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:402) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456) at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296) at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249) at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:671) at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:354) at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:277) at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:194) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:491) at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:699) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:389) ... 65 more Caused by: java.lang.IndexOutOfBoundsException: Index: 92, Size: 7 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:690) at net.sf.saxon.expr.UserFunctionCall.getTargetComponent(UserFunctionCall.java:561) at net.sf.saxon.expr.UserFunctionCall.callFunction(UserFunctionCall.java:493) at net.sf.saxon.expr.UserFunctionCall.evaluateItem(UserFunctionCall.java:451) at net.sf.saxon.expr.LetExpression.evaluateItem(LetExpression.java:512) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.instruct.LocalParam.getSelectValue(LocalParam.java:382) at net.sf.saxon.expr.instruct.LocalParamSetter.processLeavingTail(LocalParamSetter.java:280) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149) at net.sf.saxon.expr.CardinalityChecker.process(CardinalityChecker.java:320) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:285) at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:510) at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:151) at net.sf.saxon.expr.ItemChecker.process(ItemChecker.java:234) at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:391) ... 77 more
Thanks
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Michael Kay over 8 years ago
The two crashes are actually different manifestations of the same error: a component reference (probably a function call) is attempting to locate the target component using the wrong binding vector. In the first case it finds a component of the wrong type, and crashes with a ClassCastException; in the second case the binding vector is too short, and it crashes with an IOOBE.
(This is all part of the mechanism for implementing separately compiled packages in XSLT 3.0)
What the stack trace doesn't tell us is why. The theory is that whenever a component is invoked, the current component is placed in the context. The crash means that some code somewhere has failed to follow this protocol. To locate the error, we will need a repro. Thanks for your efforts on this. Don't worry if the repro contains a lot of code: so long as it doesn't have complex external dependencies, we should be able to pin it down.
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Vladimir Nesterovsky over 8 years ago
I reduced the problem to a following gibrish xslt:
I hope you can reproduce the problem on your side. Input is any xml.
It results in:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:690) at net.sf.saxon.expr.UserFunctionCall.getTargetComponent(UserFunctionCall.java:561) at net.sf.saxon.expr.UserFunctionCall.process(UserFunctionCall.java:532) at net.sf.saxon.expr.instruct.ElementCreator.constructElement(ElementCreator.java:450) at net.sf.saxon.expr.instruct.ElementCreator.evaluateItem(ElementCreator.java:390) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.instruct.LocalParam.getSelectValue(LocalParam.java:382) at net.sf.saxon.expr.instruct.LocalParamSetter.processLeavingTail(LocalParamSetter.java:280) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:283) at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:510) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:387) at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:567) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:387) at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:567) at net.sf.saxon.trans.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:67) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:433) at net.sf.saxon.Controller.transformDocument(Controller.java:2270) at net.sf.saxon.Controller.transform(Controller.java:1847) at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:553) at net.sf.saxon.Transform.processFile(Transform.java:1239) at net.sf.saxon.Transform.doTransform(Transform.java:795) at net.sf.saxon.Transform.main(Transform.java:77) java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at net.sf.saxon.expr.XPathContextMajor.getTargetComponent(XPathContextMajor.java:690) at net.sf.saxon.expr.UserFunctionCall.getTargetComponent(UserFunctionCall.java:561) at net.sf.saxon.expr.UserFunctionCall.process(UserFunctionCall.java:532) at net.sf.saxon.expr.instruct.ElementCreator.constructElement(ElementCreator.java:450) at net.sf.saxon.expr.instruct.ElementCreator.evaluateItem(ElementCreator.java:390) at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:301) at net.sf.saxon.expr.instruct.LocalParam.getSelectValue(LocalParam.java:382) at net.sf.saxon.expr.instruct.LocalParamSetter.processLeavingTail(LocalParamSetter.java:280) at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:654) at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:283) at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:510) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:387) at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:567) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:387) at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:567) at net.sf.saxon.trans.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:67) at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:433) at net.sf.saxon.Controller.transformDocument(Controller.java:2270) at net.sf.saxon.Controller.transform(Controller.java:1847) at net.sf.saxon.s9api.Xslt30Transformer.applyTemplates(Xslt30Transformer.java:553) at net.sf.saxon.Transform.processFile(Transform.java:1239) at net.sf.saxon.Transform.doTransform(Transform.java:795) at net.sf.saxon.Transform.main(Transform.java:77) Fatal error during transformation: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Michael Kay over 8 years ago
Thanks for your efforts. I regret my first attempts to reproduce it have been unsuccessful: I get
Type error at argument on line 15 column 30 of crash.xsl: XTTE0570: A sequence of more than one item is not allowed as the value of variable $code (, , ...) in built-in template rule A sequence of more than one item is not allowed as the value of variable $code (, , ...)
Changed the declaration of $code to say as="element()*", and the stylesheet runs to completion without error.
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Michael Kay over 8 years ago
FWIW, it's fairly clear from the stack trace that it's failing at the function call on line 46, where it's evaluating the default value of a local template parameter. Intuitively, that's an easy place for the code to get muddled about what the current component is. In the morning I'll do a careful code-check of that path to see if I can spot anything amiss.
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Vladimir Nesterovsky over 8 years ago
Editor has removed a some tags. Please look into file attached.
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Michael Kay over 8 years ago
Thanks, but it still doesn't fail for me. I get the output
@@
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Vladimir Nesterovsky over 8 years ago
I suspected something like this, as even small changes in that xslt, like removing something that's never called, prevents the error.
I still, can confirm that I can reproduce that problem. I'm using Saxon from maven: http://search.maven.org/#artifactdetails%7Cnet.sf.saxon%7CSaxon-HE%7C9.7.0-5%7Cjar
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Michael Kay over 8 years ago
I've reproduced it now by running with the -T option.
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Michael Kay over 8 years ago
Please track progress on this bug here:
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Michael Kay over 8 years ago
A patch has now been tested and committed.
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Vladimir Nesterovsky over 8 years ago
When can we expect it on maven?
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Michael Kay over 8 years ago
We tend to do a new maintenance release every 4-6 weeks. Can't commit to firm dates.
RE: Internal error in Saxon-HE-9.7.0-5 - Added by Vladimir Nesterovsky over 8 years ago
On you site a couple of days ago you have published that Saxon 9.7.0.6 is available. For some reason I cannot see it on maven. E.g. http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22net.sf.saxon%22%20AND%20a%3A%22Saxon-HE%22
Can you please check it?
RE: Internal error in Saxon-HE-9.7.0-5 - Added by O'Neil Delpratt over 8 years ago
Hi, the maven deployment will be done shortly. Sorry for the delay.
Please register to reply