faustedition / faust-gen-html

Pipelines to generate HTML for the Faust edition's reading texts and prints.
1 stars 4 forks source link

Grundschicht of 2 IV H.7b triggers bug in newer Saxon versions #655

Open thvitt opened 3 years ago

thvitt commented 3 years ago

After updating xmlcalabash1-gradle to 1.5.2, the text-unemend step of generate-emendations.xpl fails with an IndexOutOfBounds exception from Saxon while transforming prepared/textTranscript/2_IV_H.7b.xml. The problem remains after updating calabash and saxon to the newest versions via the dependency mechanism.

It works fine with XML Calabash Version 1.1.21 (for Saxon 9.8.0.8/HE). It is still broken when manually depending on the newest XML Calabash, classpath group: 'com.xmlcalabash', name: 'xmlcalabash', version: '1.3.2-100', which loads Saxon 10.5 HE.

Stack Trace:

Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 693 out of bounds for length 693
        at net.sf.saxon.tree.tiny.FollowingIterator.next(FollowingIterator.java:101)
        at net.sf.saxon.tree.wrapper.WrappingIterator.next(WrappingIterator.java:48)
        at net.sf.saxon.tree.util.Navigator$AxisFilter.next(Navigator.java:1195)
        at net.sf.saxon.tree.wrapper.SpaceStrippedNode$StrippingIterator.next(SpaceStrippedNode.java:358)
        at net.sf.saxon.tree.wrapper.SpaceStrippedNode$StrippingIterator.next(SpaceStrippedNode.java:331)
        at net.sf.saxon.expr.instruct.BlockIterator.next(BlockIterator.java:52)
        at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:135)
        at net.sf.saxon.expr.sort.DocumentOrderIterator.<init>(DocumentOrderIterator.java:49)
        at net.sf.saxon.expr.sort.DocumentSorter.iterate(DocumentSorter.java:268)
        at net.sf.saxon.expr.VennExpression.iterate(VennExpression.java:672)
        at net.sf.saxon.expr.instruct.Choose.iterate(Choose.java:1019)
        at net.sf.saxon.expr.ForExpression.iterate(ForExpression.java:387)
        at net.sf.saxon.expr.LetExpression.iterate(LetExpression.java:527)
        at net.sf.saxon.trans.KeyIndex.processNode(KeyIndex.java:203)
        at net.sf.saxon.trans.KeyIndex.lambda$constructIndex$0(KeyIndex.java:169)
        at net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:136)
        at net.sf.saxon.trans.KeyIndex.constructIndex(KeyIndex.java:169)
        at net.sf.saxon.trans.KeyIndex.buildIndex(KeyIndex.java:132)
        at net.sf.saxon.trans.KeyManager.buildIndex(KeyManager.java:267)
        at net.sf.saxon.trans.KeyManager.obtainSharedIndex(KeyManager.java:393)
        at net.sf.saxon.trans.KeyManager.obtainIndex(KeyManager.java:348)
        at net.sf.saxon.trans.KeyManager.selectByKey(KeyManager.java:309)
        at net.sf.saxon.functions.KeyFn.search(KeyFn.java:281)
        at net.sf.saxon.functions.KeyFn.call(KeyFn.java:205)
        at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:548)
        at net.sf.saxon.expr.Expression.effectiveBooleanValue(Expression.java:890)
        at net.sf.saxon.pattern.BasePatternWithPredicate.matchesPredicate(BasePatternWithPredicate.java:126)
        at net.sf.saxon.pattern.BasePatternWithPredicate.matches(BasePatternWithPredicate.java:117)
        at net.sf.saxon.trans.rules.Rule.matches(Rule.java:239)
        at net.sf.saxon.trans.SimpleMode.ruleMatches(SimpleMode.java:689)
        at net.sf.saxon.trans.SimpleMode.searchRuleChain(SimpleMode.java:663)
        at net.sf.saxon.trans.SimpleMode.getRule(SimpleMode.java:554)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:523)
        at net.sf.saxon.trans.rules.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:72)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:530)
        at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:661)
        at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:360)
        at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:349)
        at com.xmlcalabash.library.XSLT.run(XSLT.java:245)
        at com.xmlcalabash.runtime.XAtomicStep.run(XAtomicStep.java:390)
        at com.xmlcalabash.runtime.XForEach.run(XForEach.java:117)
        at com.xmlcalabash.runtime.XCompoundStep.run(XCompoundStep.java:262)
        at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:230)
        at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:140)
        at com.xmlcalabash.core.XProcRunnable$run.call(Unknown Source)
        at com.xmlcalabash.XMLCalabashTask.exec(XMLCalabashTask.groovy:786)