Bug #3070
closedNullPointerException at gen_CompiledFilterIterator_...matches... for selectors and abstract types
100%
Description
i get NullPointerException in runtime for attached test case:
Exception in thread "main" java.lang.NullPointerException
at gen_CompiledFilterIterator_9.matches(:5)
at com.saxonica.ee.bytecode.iter.CompiledFilterIterator.next(CompiledFilterIterator.java:46)
at net.sf.saxon.om.FocusTrackingIterator.next(FocusTrackingIterator.java:61)
at com.saxonica.ee.bytecode.iter.CompiledFilterIterator.next(CompiledFilterIterator.java:45)
at net.sf.saxon.om.FocusTrackingIterator.next(FocusTrackingIterator.java:61)
at net.sf.saxon.expr.ContextMappingIterator.next(ContextMappingIterator.java:59)
at gen_CompiledBlockIterator_1.next(:9)
at EE_local_test_01430290781.iterate(:9)
at com.saxonica.ee.bytecode.CompiledExpression.iterate(CompiledExpression.java:200)
at net.sf.saxon.value.Closure.iterate(Closure.java:189)
at EE_main_151403658846.iterate(:13)
at com.saxonica.ee.bytecode.CompiledExpression.iterate(CompiledExpression.java:200)
at net.sf.saxon.query.XQueryExpression.iterator(XQueryExpression.java:323)
at com.saxonica.xqj.SaxonXQPreparedExpression.executeQuery(SaxonXQPreparedExpression.java:93)
at com.saxonica.xqj.SaxonXQExpression.executeQuery(SaxonXQExpression.java:96)
at Run.main(Run.java:21)
Files
Related issues
Updated by O'Neil Delpratt almost 8 years ago
- Category set to Byte code generation
- Status changed from New to In Progress
- Assignee set to O'Neil Delpratt
Thanks for reporting the NPE you have found. I was able to reproduce the NPE with the zip file you sent. We are currently investigating this bug issue which is related to the bytecode generation feature.
As a workaround you can switch off the bytecode generation feature in your java problem as follows:
ds.setProperty(FeatureKeys.GENERATE_BYTE_CODE, "off");
From the command-line you would do the following: --generateByteCode:off
Updated by O'Neil Delpratt almost 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
- Applies to branch 9.6, 9.8 added
- Fix Committed on Branch 9.6, 9.7, 9.8 added
Bug fix applied in the FilterExpressionCompiler. Incorrect conditional statement: Failing to generate the NonNumeric filter iterator.
Updated by O'Neil Delpratt almost 8 years ago
- Fixed in Maintenance Release 9.7.0.15 added
Bug fix applied to the Saxon 9.7.0.15 maintenance release. Close bug issue when patch applied to 9.6 maintenance release
Updated by O'Neil Delpratt almost 8 years ago
- Status changed from Resolved to In Progress
Reopening this bug as it has been reported in bug issue #3127 to be still present in the maintenance release 9.7.0.15.
Updated by O'Neil Delpratt almost 8 years ago
- Copied to Bug #3127: Bug #3070 is still there added
Updated by Petr K over 7 years ago
workaround brings very critical bug https://saxonica.plan.io/issues/3152
please fix this bug ASAP
Updated by Michael Kay over 7 years ago
- Category changed from Byte code generation to Schema-Aware processing
- Assignee changed from O'Neil Delpratt to Michael Kay
The static type inferencing is making an incorrect inference about the cardinality of object/@attr1, and in consequence, the bytecode generator is not generating code to take account of the fact that the attribute might be absent.
Specifically, the code in UserComplexType.getAttributeUseCardinality() searches the types derived by extension from the known (abstract) type, but if it finds one derived type on which the attribute is mandatory, it is wrongly assuming that it is mandatory on all such types.
Updated by Michael Kay over 7 years ago
- Status changed from In Progress to Resolved
I have applied a source patch to correct the type inference for types derived by extension on the 9.6, 9.7, and 9.8 branches.
Updated by O'Neil Delpratt over 7 years ago
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 9.7.0.18 added
- Fixed in Maintenance Release deleted (
9.7.0.15)
Bug fix applied in the Saxon 9.7.0.18 maintenance release.
Updated by O'Neil Delpratt over 7 years ago
- Applies to branch trunk added
- Applies to branch deleted (
9.8)
Updated by O'Neil Delpratt over 7 years ago
- Fix Committed on Branch trunk added
- Fix Committed on Branch deleted (
9.8)
Please register to edit this issue