Actions
Bug #5763
closedFailure in saxon:new-attribute() - A LazySequence can only be read once. (PEJ qt3extra XP31 test fails)
Start date:
2022-12-13
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
11, trunk
Fix Committed on Branch:
11, trunk
Description
Testing name($result) = 'a'
Testing string($result) = ''
-s:saxon-new-attribute -t:new-attribute-02
A LazySequence can only be read once
java.lang.IllegalStateException: A LazySequence can only be read once
at net.sf.saxon.om.LazySequence.iterate(LazySequence.java:54)
at net.sf.saxon.om.LazySequence.head(LazySequence.java:40)
at com.saxonica.functions.extfn.NewAttribute.call(NewAttribute.java:38)
at com.saxonica.functions.extfn.NewAttribute.call(NewAttribute.java:18)
at net.sf.saxon.expr.SystemFunctionCall$SystemFunctionCallElaborator.lambda$elaborateForPull$2(SystemFunctionCall.java:617)
at net.sf.saxon.sxpath.XPathExpression.iterate(XPathExpression.java:176)
at net.sf.saxon.s9api.XPathSelector.evaluate(XPathSelector.java:229)
at net.sf.saxon.testdriver.QT3TestDriverHE.runTestCase(QT3TestDriverHE.java:590)
at net.sf.saxon.testdriver.TestDriver.lambda$processTestSet$2(TestDriver.java:713)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at net.sf.saxon.s9api.streams.XdmStream.forEach(XdmStream.java:360)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at net.sf.saxon.s9api.streams.XdmStream.forEach(XdmStream.java:360)
at net.sf.saxon.testdriver.TestDriver.processTestSet(TestDriver.java:707)
at net.sf.saxon.testdriver.TestDriver.processCatalog(TestDriver.java:350)
at net.sf.saxon.testdriver.TestDriver.go(TestDriver.java:236)
at net.sf.saxon.testdriver.QT3TestDriverHE.go(QT3TestDriverHE.java:72)
at com.saxonica.testdriver.QT3TestDriverPE.go(QT3TestDriverPE.java:59)
at com.saxonica.testdriver.QT3TestDriverPE.main(QT3TestDriverPE.java:46)
Exception in thread "main" java.lang.NullPointerException: value
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
at net.sf.saxon.s9api.XPathSelector.setVariable(XPathSelector.java:107)
at net.sf.saxon.testdriver.TestOutcome.assertType(TestOutcome.java:501)
at net.sf.saxon.testdriver.TestOutcome.testAssertion2(TestOutcome.java:390)
at net.sf.saxon.testdriver.TestOutcome.testAssertion(TestOutcome.java:308)
at net.sf.saxon.testdriver.TestOutcome.testAssertion2(TestOutcome.java:442)
at net.sf.saxon.testdriver.TestOutcome.testAssertion(TestOutcome.java:308)
at net.sf.saxon.testdriver.QT3TestDriverHE.runTestCase(QT3TestDriverHE.java:805)
at net.sf.saxon.testdriver.TestDriver.lambda$processTestSet$2(TestDriver.java:713)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at net.sf.saxon.s9api.streams.XdmStream.forEach(XdmStream.java:360)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at net.sf.saxon.s9api.streams.XdmStream.forEach(XdmStream.java:360)
at net.sf.saxon.testdriver.TestDriver.processTestSet(TestDriver.java:707)
at net.sf.saxon.testdriver.TestDriver.processCatalog(TestDriver.java:350)
at net.sf.saxon.testdriver.TestDriver.go(TestDriver.java:236)
at net.sf.saxon.testdriver.QT3TestDriverHE.go(QT3TestDriverHE.java:72)
at com.saxonica.testdriver.QT3TestDriverPE.go(QT3TestDriverPE.java:59)
at com.saxonica.testdriver.QT3TestDriverPE.main(QT3TestDriverPE.java:46)
Updated by Michael Kay about 2 years ago
- Project changed from 20 to Saxon
- Subject changed from PEJ qt3extra XP31 test fails to Failure in saxon:new-attribute() - A LazySequence can only be read once. (PEJ qt3extra XP31 test fails)
- Category set to Saxon extensions
- Status changed from New to Resolved
- Applies to branch 11, trunk added
- Fix Committed on Branch 11, trunk added
- Platforms .NET, Java added
I haven't managed to reproduce this but it's very clear in the code what's wrong, so I've corrected it (in NewAttribute.java). Similar fix to NewElement.java.
The same code is present on the 11.x branch, I've applied the fix there as well.
Updated by Community Admin almost 2 years ago
- % Done changed from 0 to 100
- Fixed in Maintenance Release 12.0 added
Bug issue fix applied in the Saxon 12.0 Major Release. Leaving this bug marked as Resolved until fix applied
Updated by O'Neil Delpratt almost 2 years ago
- Fixed in Maintenance Release 11.5 added
Bug applied in the Saxon 11.5 Maintenance release.
Updated by O'Neil Delpratt almost 2 years ago
- Status changed from Resolved to Closed
Please register to edit this issue
Actions