Project

Profile

Help

Bug #3069

closed

[Saxon 9.7] Internal Saxon error: local variable encountered whose binding has been deleted

Added by Axel Court over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2016-12-13
Due date:
% Done:

100%

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

Description

Hi,

We are getting an internal Saxon error when trying to run a stylesheet, which we never encountered with previous Saxon releases (we were using Saxon-EE 9.5.1.5J before).

The error is:

Internal Saxon error: local variable encountered whose binding has been deleted

I reproduced the bug in the attached files.

Basically, we have a main stylesheet (testCase.xsl) which imports a lot of functions (lotsOfFunctions.xsl). Whether theses functions are actually called or not does not seems to be the issue.

When trying to run the template testCase with Saxon-EE 9.7.0.13J, we are getting the error below :

*** Bad parent pointer found in 0 at 21 ***
*** Bad parent pointer found in 0 at 21 ***
*** Internal Saxon error: local variable encountered whose binding has been deleted
Variable name: fctstr
Line number of reference: 21 in file:/C:/testCase.xsl
Line number of declaration: 31 in file:/C:/testCase.xsl
DECLARATION:
<?xml version="1.0" encoding="utf-8"?>
<let vn="20" baseUri="file:/C:/testCase.xsl" ns="xs=http://www.w3.org/2001/XMLSchema xsl=http://www.w3.org/1999/XSL/Transform els=http://www.lefebvre-sarrut.eu/ns/els xd=http://www.oxygenxml.com/ns/doc/xsl" line="31" var="fctstr" as="xs:string" slot="-999" eval="-1">
 <varRef name="fctstr1" slot="0"/>
 <switch line="21">
  <varRef role="value" line="31" name="fctstr1" slot="0"/>
  <case>
   <str val="b"/>
   <int val="2"/>
  </case>
  <case>
   <str val="c"/>
   <int val="3"/>
  </case>
  <case>
   <str val="a"/>
   <int val="1"/>
  </case>
  <int role="default" val="0"/>
 </switch>
</let>
java.lang.IllegalStateException: *** Internal Saxon error: local variable encountered whose binding has been deleted
        at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:785)
        at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:794)
        at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:794)
        at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:794)
        at net.sf.saxon.expr.parser.ExpressionTool.allocateSlots(ExpressionTool.java:794)
        at net.sf.saxon.style.StyleElement.allocateLocalSlots(StyleElement.java:1586)
        at net.sf.saxon.style.XSLFunction.optimize(XSLFunction.java:440)
        at net.sf.saxon.style.PrincipalStylesheetModule.compile(PrincipalStylesheetModule.java:1208)
        at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:264)
        at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:260)
        at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:101)
        at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:859)
        at net.sf.saxon.Transform.doTransform(Transform.java:727)
        at net.sf.saxon.Transform.main(Transform.java:77)
Fatal error during transformation: java.lang.IllegalStateException: *** Internal Saxon error: local variable encountered whose binding has been deleted

The weird thing is that if I comment some functions in lotsOfFunctions.xsl, the error is gone.

Thank you for your time investigating this!


Files

testCase.xsl (1.14 KB) testCase.xsl Main stylesheet Axel Court, 2016-12-13 12:46
lotsOfFunctions.xsl (10.6 KB) lotsOfFunctions.xsl Axel Court, 2016-12-13 12:46

Please register to edit this issue

Also available in: Atom PDF