Project

Profile

Help

Bug #3655

closed

ArrayIndexOutOfBounds in "ComplexContentOutputter.namespace"

Added by Radu Coravu almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2018-02-01
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:

Description

Using Saxon 9.8 to publish a TEI ODD document to EPUB results in:

D:\projects\eXml_Saxon_9_8\frameworks\tei\xml\tei\stylesheet\common\teianttasks.xml:240: Fatal error during transformation using D:\projects\eXml_Saxon_9_8\frameworks\tei\xml\tei\stylesheet\profiles\default\epub\to.xsl: java.lang.RuntimeException: Internal error evaluating template rule  at line 286 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at org.apache.tools.ant.taskdefs.optional.TraXLiaison.fatalError(TraXLiaison.java:561)
	at net.sf.saxon.lib.DelegatingErrorListener.fatalError(DelegatingErrorListener.java:46)
	at net.sf.saxon.Controller.reportFatalError(Controller.java:1098)
	at net.sf.saxon.Controller.transform(Controller.java:2086)
	at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:599)
	at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:73)
	at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:205)
	at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:881)
	at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:419)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:402)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:435)
	at org.apache.tools.ant.Target.performTasks(Target.java:456)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
	at org.apache.tools.ant.Main.runBuild(Main.java:857)
	at org.apache.tools.ant.Main.startAnt(Main.java:236)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:113)
Caused by: net.sf.saxon.trans.XPathException: java.lang.RuntimeException: Internal error evaluating template rule  at line 286 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.trans.XPathException.makeXPathException(XPathException.java:148)
	at com.saxonica.ee.trans.ThreadManagerEE.waitForChildThreads(ThreadManagerEE.java:86)
	at net.sf.saxon.expr.XPathContextMajor.waitForChildThreads(XPathContextMajor.java:221)
	at net.sf.saxon.Controller$2.run(Controller.java:2524)
	at java.security.AccessController.doPrivileged(Native Method)
	at net.sf.saxon.Controller.transformDocument(Controller.java:2521)
	at net.sf.saxon.Controller.transform(Controller.java:2064)
	... 35 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 286 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:262)
	at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
	at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:262)
	at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:518)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:432)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:262)
	at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
	at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:262)
	at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
	at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:698)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:698)
	at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:262)
	at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
	at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ResultDocument.processInstruction(ResultDocument.java:478)
	at com.saxonica.config.EnterpriseConfiguration$5.call(EnterpriseConfiguration.java:1938)
	at com.saxonica.config.EnterpriseConfiguration$5.call(EnterpriseConfiguration.java:1934)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 270 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 64 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 82 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 77 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 286 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 85 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 270 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 93 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 82 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 106 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 286 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 114 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 270 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 122 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 82 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_figures.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 135 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 49 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/html/html_tagdocs.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 143 more
Caused by: java.lang.RuntimeException: Internal error evaluating template rule  at line 391 in module file:/D:/projects/eXml_Saxon_9_8/frameworks/tei/xml/tei/stylesheet/common/verbatim.xsl
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:374)
	at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:502)
	at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:295)
	at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:252)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 151 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 21
	at net.sf.saxon.event.ComplexContentOutputter.namespace(ComplexContentOutputter.java:331)
	at net.sf.saxon.event.ProxyReceiver.namespace(ProxyReceiver.java:144)
	at net.sf.saxon.tree.util.NamespaceIterator.sendNamespaces(NamespaceIterator.java:77)
	at net.sf.saxon.tree.tiny.TinyElementImpl.copy(TinyElementImpl.java:329)
	at net.sf.saxon.tree.tiny.TinyDocumentImpl.copy(TinyDocumentImpl.java:287)
	at net.sf.saxon.expr.instruct.CopyOf.copyOneNode(CopyOf.java:703)
	at net.sf.saxon.expr.instruct.CopyOf.processLeavingTail(CopyOf.java:561)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:170)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:337)
	at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:284)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:262)
	at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
	at net.sf.saxon.expr.instruct.CallTemplate.processLeavingTail(CallTemplate.java:411)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:879)
	at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:698)
	at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
	at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:357)
	... 162 more

Total time: 12 seconds

I will try to come up with XML + XSLTs for test.


Files

teiSamples.zip (3.47 MB) teiSamples.zip Radu Coravu, 2018-02-01 11:11
Actions #1

Updated by Radu Coravu almost 7 years ago

I uploaded a ZIP. Transform the XML called "teiSamples\sample_teiODD.odd.processedodd" with the XSLT called "teiSamples/stylesheet/profiles/default/epub/to.xsl" using for example Saxon PE 9.8, without any extra params set.

Actions #2

Updated by Michael Kay almost 7 years ago

I get a different error, with no stack trace:

Error

java.lang.RuntimeException: Internal error evaluating template rule at line 2898 in

module file:/Users/mike/bugs/2018/coravu3655/teiSamples/stylesheet/html/html_textstructure.xsl

java.lang.RuntimeException: Internal error evaluating template rule at line 2898 in module file:/Users/mike/bugs/2018/coravu3655/teiSamples/stylesheet/html/html_textstructure.xsl

Perhaps I'll try it without multithreading...

Symptoms reproduced with --generateByteCode:off --allow-multithreading:off

Actions #3

Updated by Michael Kay almost 7 years ago

  • Category set to Internals
  • Status changed from New to Resolved
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal
  • Applies to branch 9.8, trunk added
  • Fix Committed on Branch 9.8, trunk added

The crash occurs in the new 9.8 code introduced for bug 3011. It seems that the code for extending the stack holding namespace information when the tree depth exceeds the initial allocation of 20 isn't working properly for some reason.

There are two arrays used as stacks: currentLevelIsDocument (D), and copyNamespacesStack (C). In startElement, if level >= D.length, both arrays are doubled in size. At the point of failure, D has length 40 but C has length 20. It turns out D is also doubled in size where necessary by startDocument, because a startDocument call can occur at any time. So the code in startElement should not assume the two arrays are always in sync.

Fixed by a change to ComplexContentOutputter.startElement()

Actions #4

Updated by Michael Kay almost 7 years ago

  • Subject changed from AIOB in "ComplexContentOutputter.namespace" to ArrayIndexOutOfBounds in "ComplexContentOutputter.namespace"
Actions #5

Updated by Radu Coravu almost 7 years ago

Great, thanks for looking into this.

So about this remark:

Perhaps I'll try it without multithreading...

Symptoms reproduced with --generateByteCode:off --allow-multithreading:off

after you make the fix and run with multi threading enabled do you still reproduce the " Internal error evaluating template rule at line 2898" problem?

I'm wondering if it's a different problem or not.

Actions #6

Updated by Michael Kay almost 7 years ago

With multithreading enabled, I got the crash, but the stack trace was missing, presumably because the code isn't really designed to handle a low-level exception occurring in a different thread. So the only reason I switched multithreading off was to get better diagnostics. The same applies to bytecode generation - unless the internal failure is actually related to bytecode, you usually get better diagnostics if you disable it.

Actions #7

Updated by O'Neil Delpratt almost 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.8.0.8 added

Bug fix applied in the Saxon 9.8.0.8 maintenance release.

Please register to edit this issue

Also available in: Atom PDF