Bug #2704
closedNullPointerException during optimizer tracing
100%
Description
The optimizer attempts to rewrite the expression $x[position() < $n]
as @subsequence($x, 1, $n - 1)@. If optimizer tracing is switched on, the attempt to display the subsequence expression fails because properties of the arithmetic expression ($n - 1) - specifically the calculator property - are not yet available.
In addition, it seems that running from the command line with the -export option has the side-effect of switching on optimizer tracing. They should be controlled separately.
Updated by Michael Kay over 8 years ago
I have fixed the problem in net.sf.saxon.Transform whereby optimizer tracing is switched on as a side-effect of using the -export option. Patch committed on the 9.7 and 9.8 branches.
Updated by Michael Kay over 8 years ago
- Status changed from In Progress to Resolved
- Applies to branch 9.8 added
- Fix Committed on Branch 9.7, 9.8 added
Fix committed on both the 9.7 and 9.8 branches.
For the NPE, I did a belt-and-braces approach: (a) immediately after generating the ArithmeticExpression, we set the calculator on it. (b) during explain() processing, we don't attempt to output the calculator code if it is not known. This is fine during explain, but could cause a problem in export; however, the calculator code should have been allocated by then.
Updated by O'Neil Delpratt over 8 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.5 added
Bug fix applied in the Saxon 9.7.0.5 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