Bug 321272 (MONO78541) - NRE while iterating over XPathNodeIterator
Summary: NRE while iterating over XPathNodeIterator
Status: RESOLVED MOVED
Alias: MONO78541
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-30 23:04 UTC by Jonathan Chambers
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Zip file of test case (653 bytes, application/octet-stream)
2006-05-30 23:04 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:00:22 UTC


---- Reported by jonathan.chambers@ansys.com 2006-05-30 16:04:06 MST ----

Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:
NRE while iterating over XPathNodeIterator

Steps to reproduce the problem:
1. Run sample app
2. 
3. 

Actual Results:
NRE on mono, no NRE on .Net

Expected Results:
No NRE on mono

How often does this happen? 
Everytime

Additional Information:



---- Additional Comments From jonathan.chambers@ansys.com 2006-05-30 16:04:43 MST ----

Created an attachment (id=169932)
Zip file of test case




---- Additional Comments From atsushi@ximian.com 2006-05-30 22:56:28 MST ----

It is not an XPath bug since replacing 

    foreach (XPathNavigator importNav in inav)

with

    while (inav.MoveNext ())

just works.

It rather looks iterator bug since replacing 

	while (MoveNext ())
		yield return Current;


in XPathNodeIterator.GetEnumerator () with

	ArrayList al = new ArrayList ();
	while (MoveNext ())
		al.Add (Current);
	return al.GetEnumerator ();

makes it work.



---- Additional Comments From rharinath@novell.com 2006-05-31 04:37:05 MST ----

Can you try adding aliases to MoveNext and Current and use those in
GetEnumerator.



---- Additional Comments From martin@ximian.com 2006-06-21 12:11:59 MST ----

A csc-generated binary also crashes with Mono.



---- Additional Comments From martin@ximian.com 2006-06-21 12:16:51 MST ----

The gmcs-compiled test case PEVerifies and runs fine on the MS runtime.



---- Additional Comments From vargaz@gmail.com 2006-06-29 12:35:16 MST ----

Could somebody create an independent testcase which doesn't depend on
XPath ?




---- Additional Comments From joncham@gmail.com 2006-08-15 09:03:21 MST ----

Marking this as duplicate of different bug. Duncan found an
independent test case when I could not.

*** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO79075 ***

Imported an attachment (id=169932)

Unknown operating system unknown. Setting to default OS "Other".
This bug was marked DUPLICATE in the database it was moved from.
    Changing resolution to "MOVED"