[Mono-bugs] [Bug 518645] New: XML read error

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 2 05:59:07 EDT 2009


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


           Summary: XML read error
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.0.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: io-layer
        AssignedTo: lupus at novell.com
        ReportedBy: jjasper22 at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 GTB5

Null (?) XML exception thrown when reading XML file when Encoding set to
Unicode. When I use XMLDocument.Load(Stream ) function it fails with null
exception (at least in Monodevelop I can not see exception info). If I wrap
this null exception in class as parameter the actual message is:
SystemArgumentException: length at System.Array.Copy .....

Reproducible: Always

Steps to Reproduce:
FileStream fStream = new FileStream(PATH_TO_XML_FILE, FileMode.Open,
FileAccess.Read, FileShare.None);

StreamReader mReader = new StreamReader(fStream, System.Text.Encoding.Unicode);
XmlDocument mDoc = new XmlDocument();

mDoc.Load(mReader);   <-- Fail here (with hidden error ?)

but if you change 
StreamReader mReader = new StreamReader(fStream, System.Text.Encoding.Unicode);
to
StreamReader mReader = new StreamReader(fStream, System.Text.Encoding.Default);
everything works smooth
Actual Results:  
Fails with incorrect reading error

Expected Results:  
Normal reading of XML file

-- 
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