[Mono-bugs] [Bug 477049] New: Using XmlNode.SelectSingleNode with multiple threads almost always fails and throws an Exception.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Feb 18 11:57:42 EST 2009
https://bugzilla.novell.com/show_bug.cgi?id=477049
Summary: Using XmlNode.SelectSingleNode with multiple threads
almost always fails and throws an Exception.
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: All
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.XML
AssignedTo: atsushi at ximian.com
ReportedBy: Vernish13 at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=273657)
--> (https://bugzilla.novell.com/attachment.cgi?id=273657)
Includes Test.cs and TestFile.xml
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.6)
Gecko/2009011913 Firefox/3.0.6
Start multiple threads and each creates its own XmlDocument from the same file.
Then each of those threads starts multiple threads to read their XmlDocument.
While reading each thread uses XmlNode.SelectSingleNode(). SelectSingleNode
will very frequently return null when it should have returned an XmlNode.
Sometimes an Assertion Exception will be thrown also.
Reproducible: Always
Steps to Reproduce:
1. Extract the attached zip file. It should contain Test.cs and TestFile.xml
2. Compile Test.cs. Using gmcs or csc. Ex. csc Test.cs
3. Run at the console ( >mono Test.exe ). If it completes successfully, run
it again.
Actual Results:
Actual Results Vary. I have seen it complete successfully, but normally one of
the errors below occurs.
Most Common Is :
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
at System.Xml.XPath.CompiledExpression.EvaluateNodeSet
(System.Xml.XPath.BaseI
terator iter) [0x00000]
at System.Xml.XPath.XPathNavigator.Select (System.Xml.XPath.XPathExpression
ex
pr, IXmlNamespaceResolver ctx) [0x00000]
at System.Xml.XPath.XPathNavigator.Select (System.Xml.XPath.XPathExpression
ex
pr) [0x00000]
at System.Xml.XmlNode.SelectSingleNode (System.String xpath,
System.Xml.XmlNam
espaceManager nsmgr) [0x00000]
at System.Xml.XmlNode.SelectSingleNode (System.String xpath) [0x00000]
at SelectNodeTests.Program.RepeatedMetadataNodeLookUp
(SelectNodeTests.ThreadR
eadData data) [0x00000]
at SelectNodeTests.Program.ReadDocument (System.Object arg) [0x00000]
This has happened a couple times :
System.Xml.XPath.NullIterator doesn't implement interface
System.IFormatProvider
* Assertion: should not be reached at ..\mono\mini\mini-trampolines.c:67
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Expected Results:
"Done" Displayed on the console.
--
Configure bugmail: https://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