Project

Profile

Help

Bug #2251

NullReferenceException when transforming to TextWriterDestination [Saxon-HE 9.6.0.3]

Added by Emanuel Wlaschitz almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
.NET API
Sprint/Milestone:
Start date:
2014-12-09
Due date:
% Done:

100%

Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:

Program.cs (1.8 KB) Emanuel Wlaschitz, 2014-12-09 16:48 Program.cs

History

#1 Updated by Emanuel Wlaschitz almost 5 years ago

Aww crap, wrong button and submitted an empty report :(

Anyways, performing an in-memory transformation into a TextWriterDestination causes a NullReferenceException inside transformer.Run (see the attached code sample).

This seems to work when changing it to a NullDestination or a Serializer with output stream, so it must have something to do with the TextWriterDestination.

The attached sample should work with any XSLT (i used an identity transform to transform itself).

#2 Updated by O'Neil Delpratt almost 5 years ago

  • Status changed from New to In Progress
  • Assignee set to O'Neil Delpratt
  • Priority changed from Low to Normal
  • Found in version changed from 9.6.0.3 to 9.6

Thanks for reporting the issue you have found. Investigating it now

#3 Updated by O'Neil Delpratt almost 5 years ago

It seems that the root cause to the NPE is the failure to set the pipelineConfiguration in the method GetReceiver of the class TextWriterDestination. Later in the transform a call is made on the pipelineConfiguration, which has not be set on the DotNetReceiver, therefore NPE is thrown.

#4 Updated by O'Neil Delpratt almost 5 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Bug fixed and committed to subversion. Change made to Destination.cs

The patch will be available in the next maintenance release.

#5 Updated by Community Admin almost 5 years ago

Create test case with the C# code provided in the Saxon9.6 Nunit test suite.

Test Case: TestTextWriterDestination() in the test set TestXsltTransformer.cs

#6 Updated by O'Neil Delpratt over 4 years ago

  • Fixed in version set to 9.6.0.4

Bug fix applied in the Saxon 9.6.0.4 maintenance release.

#7 Updated by O'Neil Delpratt over 4 years ago

  • Status changed from Resolved to Closed

#8 Updated by O'Neil Delpratt almost 4 years ago

  • Sprint/Milestone set to 9.6.0.4
  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.4 added

#9 Updated by O'Neil Delpratt almost 4 years ago

  • Sprint/Milestone changed from 9.6.0.4 to 9.6.0.3
  • Fixed in Maintenance Release 9.6.0.3 added
  • Fixed in Maintenance Release deleted (9.6.0.4)

#10 Updated by O'Neil Delpratt almost 4 years ago

  • Sprint/Milestone changed from 9.6.0.3 to 9.6.0.4
  • Fixed in Maintenance Release 9.6.0.4 added
  • Fixed in Maintenance Release deleted (9.6.0.3)

Please register to edit this issue

Also available in: Atom PDF