[Mono-bugs] [Bug 629714] New: NullReferenceException during Xsl transformation, where .Net works fine

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Aug 9 17:50:25 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=629714

http://bugzilla.novell.com/show_bug.cgi?id=629714#c0


           Summary: NullReferenceException during Xsl transformation,
                    where .Net works fine
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: benjamin.podszun at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=381699)
 --> (http://bugzilla.novell.com/attachment.cgi?id=381699)
Testcase

Description of Problem:

Creating a patch for a cross-platform software lead to a NPE based crash on
Linux, because differences between the way .Net and Mono handle Xsl functions.

Steps to reproduce the problem:
1. Compile attached code
2. Run


Actual Results:

$ mono bin/Debug/Testcase.exe

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
  at Mono.Xml.Xsl.XsltDocument.Evaluate (System.Xml.XPath.BaseIterator iter)
[0x00000] in <filename unknown>:0 
  at System.Xml.XPath.Expression.EvaluateNodeSet (System.Xml.XPath.BaseIterator
iter) [0x00000] in <filename unknown>:0 
  at System.Xml.XPath.ExprSLASH.Evaluate (System.Xml.XPath.BaseIterator iter)
[0x00000] in <filename unknown>:0 
  at System.Xml.XPath.Expression.EvaluateNodeSet (System.Xml.XPath.BaseIterator
iter) [0x00000] in <filename unknown>:0 
  at System.Xml.XPath.CompiledExpression.EvaluateNodeSet
(System.Xml.XPath.BaseIterator iter) [0x00000] in <filename unknown>:0 
  at System.Xml.XPath.XPathNavigator.Select (System.Xml.XPath.XPathExpression
expr, IXmlNamespaceResolver ctx) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslTransformProcessor.Select
(System.Xml.XPath.XPathExpression expr) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.Operations.XslApplyTemplates.Evaluate
(Mono.Xml.Xsl.XslTransformProcessor p) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.Operations.XslTemplateContent.Evaluate
(Mono.Xml.Xsl.XslTransformProcessor p) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.Operations.XslLiteralElement.Evaluate
(Mono.Xml.Xsl.XslTransformProcessor p) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.Operations.XslTemplateContent.Evaluate
(Mono.Xml.Xsl.XslTransformProcessor p) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslTemplate.EvaluateCore (Mono.Xml.Xsl.XslTransformProcessor
p, System.Collections.Hashtable withParams) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslTemplate.Evaluate (Mono.Xml.Xsl.XslTransformProcessor p,
System.Collections.Hashtable withParams) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslTransformProcessor.ApplyTemplates
(System.Xml.XPath.XPathNodeIterator nodes, System.Xml.XmlQualifiedName mode,
System.Collections.ArrayList withParams) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslDefaultNodeTemplate.Evaluate
(Mono.Xml.Xsl.XslTransformProcessor p, System.Collections.Hashtable withParams)
[0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslTransformProcessor.ApplyTemplates
(System.Xml.XPath.XPathNodeIterator nodes, System.Xml.XmlQualifiedName mode,
System.Collections.ArrayList withParams) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.Operations.XslApplyTemplates.Evaluate
(Mono.Xml.Xsl.XslTransformProcessor p) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.Operations.XslTemplateContent.Evaluate
(Mono.Xml.Xsl.XslTransformProcessor p) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.Operations.XslLiteralElement.Evaluate
(Mono.Xml.Xsl.XslTransformProcessor p) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.Operations.XslTemplateContent.Evaluate
(Mono.Xml.Xsl.XslTransformProcessor p) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslTemplate.EvaluateCore (Mono.Xml.Xsl.XslTransformProcessor
p, System.Collections.Hashtable withParams) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslTemplate.Evaluate (Mono.Xml.Xsl.XslTransformProcessor p,
System.Collections.Hashtable withParams) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslTransformProcessor.ApplyTemplates
(System.Xml.XPath.XPathNodeIterator nodes, System.Xml.XmlQualifiedName mode,
System.Collections.ArrayList withParams) [0x00000] in <filename unknown>:0 
  at Mono.Xml.Xsl.XslTransformProcessor.Process
(System.Xml.XPath.XPathNavigator root, Mono.Xml.Xsl.Outputter outputtter,
System.Xml.Xsl.XsltArgumentList args, System.Xml.XmlResolver resolver)
[0x00000] in <filename unknown>:0 
  at System.Xml.Xsl.XslTransform.Transform (System.Xml.XPath.XPathNavigator
input, System.Xml.Xsl.XsltArgumentList args, System.IO.TextWriter output,
System.Xml.XmlResolver resolver) [0x00000] in <filename unknown>:0 
  at System.Xml.Xsl.XslTransform.Transform (IXPathNavigable input,
System.Xml.Xsl.XsltArgumentList args, System.IO.TextWriter output) [0x00000] in
<filename unknown>:0 
  at Testcase.Program.Main () [0x00000] in <filename unknown>:0 


Expected Results:

PS C:\...\Testcase> .\bin\Debug\Testcase.exe
<?xml version="1.0" encoding="utf-16"?><result
xmlns:testext="http://localhost/testext"><div class="test"></div></result
>

How often does this happen? 

Always.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list