[Mono-bugs] [Bug 552664] New: XDocument.Load throw a NullReferenceException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 4 17:15:07 EST 2009


           Summary: XDocument.Load throw a NullReferenceException
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: lnc19 at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:
Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15

Executing the following code throw an exception

FileStream fs = File.Open("/home/luciano/Encoding.xml", FileMode.Open);
XmlTextReader tr = new XmlTextReader (fs);
XDocument doc = XDocument.Load (tr);

Reproducible: Always

Steps to Reproduce:
1. Copy the code in some file
2. Compile
3. Run it
Actual Results:  
System.NullReferenceException: Object reference not set to an instance of an
  at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, LoadOptions
options) [0x00000] in
  at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader) [0x00000] in

Expected Results:  
Load the Document

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