Bug #2704
closed
NullPointerException during optimizer tracing
Applies to branch:
9.7, trunk
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
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.
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.
- 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.
- 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.
- Sprint/Milestone set to 9.7.0.5
- Applies to branch trunk added
- Applies to branch deleted (
9.8)
- Fix Committed on Branch trunk added
- Fix Committed on Branch deleted (
9.8)
Please register to edit this issue
Also available in: Atom
PDF