Project

Profile

Help

Bug #2704

closed

NullPointerException during optimizer tracing

Added by Michael Kay about 8 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT export
Sprint/Milestone:
Start date:
2016-04-08
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7, trunk
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
Platforms:

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.

Actions #1

Updated by Michael Kay about 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.

Actions #2

Updated by Michael Kay about 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.

Actions #3

Updated by O'Neil Delpratt almost 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.

Actions #4

Updated by O'Neil Delpratt almost 8 years ago

  • Sprint/Milestone set to 9.7.0.5
Actions #5

Updated by O'Neil Delpratt almost 7 years ago

  • Applies to branch trunk added
  • Applies to branch deleted (9.8)
Actions #6

Updated by O'Neil Delpratt almost 7 years ago

  • Fix Committed on Branch trunk added
  • Fix Committed on Branch deleted (9.8)

Please register to edit this issue

Also available in: Atom PDF