Project

Profile

Help

Bug #5719

closed

java.lang.NullPointerException: Cannot invoke "net.sf.saxon.str.UnicodeString.length32()" because "s" is null

Added by Jeremy Odekirk about 2 years ago. Updated about 2 years ago.

Status:
Duplicate
Priority:
Low
Assignee:
Category:
Byte code generation
Sprint/Milestone:
-
Start date:
2022-10-25
Due date:
% Done:

0%

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

Description

Upgrading from Saxon 10.5 EE to 11.4 EE causes transform to fail.

I tried using process of elimination on the data but couldn't figure out what's causing the issue. Saxon 10.5 works but 11.1 and 11.4 give the same errors.

The main XSL is Mercury_Parts_Catalog.xsl.

Saxon 10 works but Saxon 11 errors out: java -cp C:\Mercury_Stylesheets\saxon\saxon-ee-11.4.jar; net.sf.saxon.Transform -o:"d:\temp\outSaxon.fo" -s:"D:\temp\pcat_saxon11.4_sample\sampleXML\PCat test 98291983_fra_1_tiny_block.xml" -xsl:"C:\Mercury_Stylesheets\Mercury_Parts_Catalog.xsl" -warnings:silent java.lang.NullPointerException: Cannot invoke "net.sf.saxon.str.UnicodeString.length32()" because "s" is null … java.lang.RuntimeException: Internal error evaluating template rule at line 2209 in module file:/C:/Mercury_Stylesheets/Mercury_Parts_parts_list.xsl … Fatal error during transformation: java.lang.RuntimeException: Internal error evaluating template rule at line 26 in module file:/C:/Mercury_Stylesheets/Mercury_Parts_Catalog.xsl


Files

pcat_saxon11.4_sample.zip (64 KB) pcat_saxon11.4_sample.zip Jeremy Odekirk, 2022-10-25 17:07
Actions #1

Updated by Michael Kay about 2 years ago

I've reproduced the problem running 11.4 from the command line, but it doesn't occur when running the current development snapshot of 11.x within the IDE, so there's a very good chance that it's a bug we've recently found and fixed.

Actions #2

Updated by Michael Kay about 2 years ago

It seems to be a problem in generated bytecode; as a workaround, run with -opt:-c on the command line, which suppresses bytecode generation.

Actions #3

Updated by Michael Kay about 2 years ago

I would conjecture that this is a duplicate of bug #5668.

Actions #4

Updated by Michael Kay about 2 years ago

I have confirmed that this is the same bug as #5668 (I rolled back the patch for that bug in the IDE, and the stylesheet now crashes).

Please run with bytecode disabled until we ship the maintenance release that fixes this.

Actions #5

Updated by Michael Kay about 2 years ago

  • Category set to Byte code generation
  • Status changed from New to Duplicate
  • Assignee set to Michael Kay

Resolved as a duplicate.

Please register to edit this issue

Also available in: Atom PDF