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 [EMAIL PROTECTED]

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

--- shadow/80331        2006-12-20 13:11:35.000000000 -0500
+++ shadow/80331.tmp.12617      2006-12-20 13:11:35.000000000 -0500
@@ -0,0 +1,85 @@
+Bug#: 80331
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.XML
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Xml hangs if you insert a node before itself.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+It's easy to get "hangs" (infinite looping, 100% CPU usage) with System.Xml
+if you insert a node before itself.
+
+Steps to reproduce the problem:
+1. Save the following program as `rx.cs':
+
+       using System;
+       using System.Xml;
+
+       class Test {
+               public static void Main ()
+               {
+                       XmlDocument d = new XmlDocument ();
+                       XmlElement r = d.CreateElement ("Docs");
+                       d.AppendChild (r);
+
+                       XmlElement s = Create (d, "param", "pattern");
+                       s.AppendChild (Create (d, "para", "insert text here"));
+
+                       r.AppendChild (s);
+                       r.AppendChild (Create (d, "param", "pattern"));
+                       r.AppendChild (Create (d, "param", "pattern"));
+                       r.PrependChild (s);
+
+                       Console.WriteLine ("OuterXml=" + d.OuterXml);
+               }
+
+               private static XmlElement Create (XmlDocument d, string name, 
string param)
+               {
+                       XmlElement e = d.CreateElement (name);
+                       e.SetAttribute ("name", param);
+                       return e;
+               }
+       }
+
+2. Compile it: mcs rx.cs
+3. Run it: mono rx.exe
+
+Actual Results:
+
+No output, CPU at 100%.
+
+Expected Results:
+
+Either:
+
+1. An exception stating that you shouldn't insert a node before itself.
+
+-or-
+
+2. InsertBefore() silently ignoring an attempt to insert a node before
+itself, resulting in the output:
+
+OuterXml=<Docs><param name="pattern"><para name="insert text here"
+/></param><param name="pattern" /><param name="pattern" /></Docs>
+
+How often does this happen? 
+
+Always.
+
+Additional Information:
+
+Tested on Mono 1.1.13.2, 1.1.13.7, and svn-HEAD (circa 2006-12-18).
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to