[Mono-bugs] [Bug 68928][Nor] New - DataSet.ReadXml table string allocation error

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 29 Oct 2004 04:54:20 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bugzilla-ximian.20.abienvenu@spamgourmet.com.

http://bugzilla.ximian.com/show_bug.cgi?id=68928

--- shadow/68928	2004-10-29 04:54:20.000000000 -0400
+++ shadow/68928.tmp.32400	2004-10-29 04:54:20.000000000 -0400
@@ -0,0 +1,95 @@
+Bug#: 68928
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Mandrake 10.0 and Debian Sarge
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bugzilla-ximian.20.abienvenu@spamgourmet.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DataSet.ReadXml table string allocation error
+
+Description of Problem:
+
+I want to display some data coming from an XML file into an ASP Datagrid.
+However, when I call System.Data.DataSet.ReadXml(), an exception occur.
+
+Steps to reproduce the problem:
+1. Get the attached archive, and decompress it
+2. (Optionnal) Compile Bug.cs
+3. Run "mono Bug.exe"
+
+Actual Results:
+
+Unhandled Exception: System.Data.DataException: The table string is already
+allocated as another table's child table.
+in <0x000a4> System.Data.XmlDataInferenceLoader:GetMappedTable
+(System.Data.TableMapping,string,string)
+in <0x00078> System.Data.XmlDataInferenceLoader:InferRepeatedElement
+(System.Data.TableMapping,System.Xml.XmlElement)
+in <0x0055c> System.Data.XmlDataInferenceLoader:InferTableElement
+(System.Data.TableMapping,System.Xml.XmlElement)
+in <0x005c4> System.Data.XmlDataInferenceLoader:InferTableElement
+(System.Data.TableMapping,System.Xml.XmlElement)
+in <0x00016> System.Data.XmlDataInferenceLoader:InferTopLevelTable
+(System.Xml.XmlElement)
+in <0x002c4> System.Data.XmlDataInferenceLoader:ReadXml ()
+in <0x0003c> System.Data.XmlDataInferenceLoader:Infer
+(System.Data.DataSet,System.Xml.XmlDocument,System.Data.XmlReadMode,string[])
+in <0x00015> System.Data.DataSet:InferXmlSchema
+(System.Xml.XmlDocument,string[])
+in <0x003b0> System.Data.DataSet:ReadXml
+(System.Xml.XmlReader,System.Data.XmlReadMode)
+in <0x00017> System.Data.DataSet:ReadXml (System.Xml.XmlReader)
+in <0x0003b> System.Data.DataSet:ReadXml (System.IO.TextReader)
+in <0x000fd> Bug:Main ()
+
+Expected Results:
+
+No exception.
+
+How often does this happen? 
+
+Always, with Mono 1.0.2 and Mono 1.1.1.
+
+Additional Information:
+
+The problem will only occur if the XML file contains at least two complex
+items. For exemple, this XML file will not produce any problem :
+
+<?xml version="1.0" encoding="utf-16"?>
+<ArrayOfUserEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <UserEntry>
+    <login>test</login>
+    <emails>
+      <string>me@there.com</string>
+      <string>this.is.me@there.com</string>
+    </emails>
+  </UserEntry>
+</ArrayOfUserEntry>
+
+However, this one will make the exception occur :
+
+<?xml version="1.0" encoding="utf-16"?>
+<ArrayOfUserEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <UserEntry>
+    <login>test</login>
+    <emails>
+      <string>me@there.com</string>
+      <string>this.is.me@there.com</string>
+    </emails>
+    <permissions>
+      <string>manage_vacation</string>
+      <string>manage_timesheet</string>
+    </permissions>
+  </UserEntry>
+</ArrayOfUserEntry>