Bug 21466 - XPathNavigator.Select and MoveNext problem
Summary: XPathNavigator.Select and MoveNext problem
Status: CLOSED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.14.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-07-20 23:11 UTC by heebaek choi
Modified: 2014-07-23 05:34 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
CLOSED INVALID

Description heebaek choi 2014-07-20 23:11:50 UTC
I think this is the same bug with 

https://bugzilla.xamarin.com/show_bug.cgi?id=4739

I am working with HtmlAgilityPack and IOS version has no problem. but exception is occur on android.

I think fix not applied on XAMARIN ANDROID (may be fix only iOS version or MONO ANDROID)

please see this problem again. thanks.

---------------------- paste from https://bugzilla.xamarin.com/show_bug.cgi?id=4739

string xml = "<root><one><two>A<three>B</three>C</two></one></root>";

var doc = XElement.Parse(xml);
var it = otherDoc.CreateNavigator().Select("//one");
it.MoveNext();
var one = it.Current;
var three = one.Select("two/three");
three.MoveNext();
Console.WriteLine(three.Current.InnerXml);

Expected Output:
B

Actual Output:
NullReferenceException because three.Current is null.
Comment 1 Sadik Ali 2014-07-21 06:08:44 UTC
I have tried to reproduce this issue but not able to reproduce this. To reproduce this I have followed the steps mentioned below :

1. Create a simple android application.
2. Implement the code provided in bug description in created android application and debug the code.

Screencast : http://screencast.com/t/s1XlQrR5

I have checked this issue on both Xamarin.Android versions 4.12.6.1 and 4.14.0.51 and getting the expected output on both builds version.

Please let me know if I missed anything to reproduce this.

Environment Info :

=== Xamarin Studio ===

Version 5.1.4 (build 0)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.4.0 ((no/954ed3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000214

=== Xamarin.Android ===

Version: 4.12.6 (Indie Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Apple Developer Tools ===

Xcode 5.1 (5084)
Build 5B130a

=== Xamarin.iOS ===

Version: 7.2.5.5 (Indie Edition)
Hash: 87026b6
Branch: 
Build date: 2014-07-02 19:39:08-0400

=== Xamarin.Mac ===

Version:

=== Build Information ===

Release ID: 501040000
Git revision: 7d45bbe2ee22625f125d0c52548524f02d005cca
Build date: 2014-07-14 12:15:53-04
Xamarin addins: c78f1d88e57baa928aeee1484d96e6f8edf8de33

=== Operating System ===

Mac OS X 10.9.2
Darwin MacMini.local 13.1.0 Darwin Kernel Version 13.1.0
    Thu Jan 16 19:40:37 PST 2014
    root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Comment 2 heebaek choi 2014-07-22 02:37:49 UTC
I am very sorry. i found bug in my code.
I appreciate your fast feedback.
Thanks very much.
Comment 3 Udham Singh 2014-07-23 05:32:16 UTC
As per the comment #2 closing this bug as resolved-invalid.