Bug 25136 - [iOS] ListView.ScrollTo is no longer working in pre1 (worked in pre0)
Summary: [iOS] ListView.ScrollTo is no longer working in pre1 (worked in pre0)
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-12-07 09:38 UTC by Duncan Ogilvie
Modified: 2015-01-28 05:03 UTC (History)
5 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:
VERIFIED FIXED

Description Duncan Ogilvie 2014-12-07 09:38:01 UTC
Overview:
Calling ListView.ScrollTo immediately after updating the contents of ListView.ItemsSource generates an exception on iOS (but is working correctly on Android, not tested on WP).

Steps to Reproduce:
1) Clone the repository here with example code: https://github.com/MitchMilam/XamarinForms_1_3_0
2) Update the Xamarin.Forms package to 1.3.0.6275-pre1 for the iOS project
3) Run on an iPhone simulator and click the 'ListView.ScrollTo' sample
4) Click the 'Add' button

Expected Results:
Scroll to the end of the ListView and not throw an exception.

Build Date & Platform:
Xamarin.Forms 1.3.0.6275-pre1

Exactly the same code works on Android.

Additional Information:

Starting a new Task and then invoke the scrolling on the UI thread will not crash and works as expected.

System.Threading.Tasks.Task.Factory.StartNew (() => {
Device.BeginInvokeOnMainThread (() => listView.ScrollTo (person, ScrollToPosition.End, true));
});
Comment 1 Rajneesh Kumar 2014-12-30 06:21:41 UTC
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the steps provided in bug description. I observed that, when I clicked on "Add" button, getting following exception:
"MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown." Please refer the screencast for the same.

Additional Info: User is not getting exception with Xamarin.Forms 1.3.0.6262-pre0.

====Supplement Info====
Screencast:http://www.screencast.com/t/MxiVS8vdL0zG
Application Output: https://gist.github.com/Rajneesh360Logica/a22a30b97fd2fa7329ef
Exception details: https://gist.github.com/Rajneesh360Logica/c9c49addde5bf1bba479
Build output: https://gist.github.com/Rajneesh360Logica/f5d90689fbf3bb3b9c3a
XS Logs: http://www.screencast.com/t/WmmdrsGJuQ

Environment Info:

Xamarin.Forms 1.3.0.6275-pre1

=== Xamarin Studio ===

Version 5.5.4 (build 15)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.10.0 ((detached/92c4884)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000031

=== Xamarin.Android ===

Version: 4.20.0.28 (Business 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)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.4.0.47 (Business Edition)
Hash: 7244769
Branch: 
Build date: 2014-12-11 14:54:30-0500

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 505040015
Git revision: f93940a35458a18052f1a25e106e62ca970d9c40
Build date: 2014-11-19 15:32:41-05
Xamarin addins: dc23cbd91a3a0e1d326328e1229e86c942a49ec8

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Seth Rosetter 2015-01-26 19:22:58 UTC
I have verified this behavior up to Xamarin.Forms.1.3.1.6296. This issue is resolved in the latest prerelease, Xamarin.Forms.1.3.2.6299-pre1.
Comment 3 Rajneesh Kumar 2015-01-28 05:03:03 UTC
I have checked this issue with the following builds:

Xamarin Studio Version 5.7.1 (build 15)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)
Package version: 312000068
 Apple Developer Tools Xcode 6.1 (6604)
Xamarin.iOS Version: 8.6.1.23 (Business Edition)
Build date: 2015-01-27 17:37:50-0500
Operating System Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
Sun Aug 17 19:50:11 PDT 2014
root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64

Xamarin Forms Version: 1.3.2.6299-pre1

I observed that, when I clicked on "Add" button not getting any exception. This issue is working fine now. Here is the screencast for the same: http://www.screencast.com/t/7P3Mbjzo

This issue has been fixed, hence closing this issue.