Project

Profile

Help

Bug #4987

closed

NPE when references to static XSLT parameters appear in non-static expressions

Added by Norm Tovey-Walsh over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2021-05-11
Due date:
% Done:

100%

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

Description

$ java ... com.saxonica.Transform -xsl:src/docs/xsl/jstree.xsl -export:/tmp/out.sef -target:JS -nogo -l:on --generateByteCode:off -relocate:on "-ns:##html5" saxon-js-version=2.2

throws an NPE:

java.lang.NullPointerException
	at net.sf.saxon.expr.parser.LoopLifter.markDependencies(LoopLifter.java:168)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:119)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:101)
	at net.sf.saxon.expr.parser.LoopLifter.process(LoopLifter.java:51)
	at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1075)
	at com.saxonica.ee.optim.OptimizerEE.tryInlineFunctionCall(OptimizerEE.java:1576)
	at net.sf.saxon.expr.UserFunctionCall.optimize(UserFunctionCall.java:420)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.SlashExpression.optimize(SlashExpression.java:354)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.SlashExpression.optimize(SlashExpression.java:354)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.instruct.ApplyTemplates.optimize(ApplyTemplates.java:231)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:618)
	at net.sf.saxon.expr.instruct.ResultDocument.optimize(ResultDocument.java:267)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:618)
	at net.sf.saxon.expr.instruct.Block.optimize(Block.java:672)
	at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1063)
	at net.sf.saxon.style.XSLTemplate.optimize(XSLTemplate.java:1002)
	at net.sf.saxon.style.PrincipalStylesheetModule.optimizeTopLevel(PrincipalStylesheetModule.java:1478)
	at net.sf.saxon.style.PrincipalStylesheetModule.compile(PrincipalStylesheetModule.java:1274)
	at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:322)
	at net.sf.saxon.s9api.XsltCompiler.compilePackage(XsltCompiler.java:580)
	at net.sf.saxon.Transform.doTransform(Transform.java:738)
	at net.sf.saxon.Transform.main(Transform.java:82)
java.lang.NullPointerException
	at net.sf.saxon.expr.parser.LoopLifter.markDependencies(LoopLifter.java:168)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:119)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:122)
	at net.sf.saxon.expr.parser.LoopLifter.gatherInfo(LoopLifter.java:101)
	at net.sf.saxon.expr.parser.LoopLifter.process(LoopLifter.java:51)
	at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1075)
	at com.saxonica.ee.optim.OptimizerEE.tryInlineFunctionCall(OptimizerEE.java:1576)
	at net.sf.saxon.expr.UserFunctionCall.optimize(UserFunctionCall.java:420)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.SlashExpression.optimize(SlashExpression.java:354)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.SlashExpression.optimize(SlashExpression.java:354)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.instruct.ApplyTemplates.optimize(ApplyTemplates.java:231)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:618)
	at net.sf.saxon.expr.instruct.ResultDocument.optimize(ResultDocument.java:267)
	at net.sf.saxon.expr.Operand.optimize(Operand.java:228)
	at net.sf.saxon.expr.Expression.optimizeChildren(Expression.java:618)
	at net.sf.saxon.expr.instruct.Block.optimize(Block.java:672)
	at net.sf.saxon.expr.parser.ExpressionTool.optimizeComponentBody(ExpressionTool.java:1063)
	at net.sf.saxon.style.XSLTemplate.optimize(XSLTemplate.java:1002)
	at net.sf.saxon.style.PrincipalStylesheetModule.optimizeTopLevel(PrincipalStylesheetModule.java:1478)
	at net.sf.saxon.style.PrincipalStylesheetModule.compile(PrincipalStylesheetModule.java:1274)
	at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:322)
	at net.sf.saxon.s9api.XsltCompiler.compilePackage(XsltCompiler.java:580)
	at net.sf.saxon.Transform.doTransform(Transform.java:738)
	at net.sf.saxon.Transform.main(Transform.java:82)
Fatal error during transformation: java.lang.NullPointerException:  (no message)

Files

app-functions.xsl (2.28 KB) app-functions.xsl Norm Tovey-Walsh, 2021-05-11 13:18
jstree.xsl (29.4 KB) jstree.xsl Norm Tovey-Walsh, 2021-05-11 13:18
body.xsl (4.13 KB) body.xsl Norm Tovey-Walsh, 2021-05-11 13:18
el-fnd-body.xsl (3.58 KB) el-fnd-body.xsl Norm Tovey-Walsh, 2021-05-11 13:18
elements-body.xsl (8.89 KB) elements-body.xsl Norm Tovey-Walsh, 2021-05-11 13:18
findtext.xsl (14.4 KB) findtext.xsl Norm Tovey-Walsh, 2021-05-11 13:18
functions-body.xsl (8.71 KB) functions-body.xsl Norm Tovey-Walsh, 2021-05-11 13:18

Please register to edit this issue

Also available in: Atom PDF