Bug 25611 - In WindowsPhone, an exception occurs in ScrollTo of ListView.
Summary: In WindowsPhone, an exception occurs in ScrollTo of ListView.
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 1.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-12-25 04:23 UTC by sin
Modified: 2015-01-26 12:44 UTC (History)
6 users (show)

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


Attachments
A state of exception outbreak (90.33 KB, image/png)
2014-12-25 04:24 UTC, sin
Details
Sample App (5.24 MB, application/octet-stream)
2015-01-06 10:03 UTC, Ram Chandra
Details
ZipXamarinLogs (5.29 KB, application/octet-stream)
2015-01-06 10:05 UTC, Udham Singh
Details


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 sin 2014-12-25 04:23:33 UTC
Use Xamarin.Forms 1.3.0.6292
In WindowsPhone, an exception occurs in ScrollTo of ListView.
Even 1.3.1.6294-pre1 is the same

public class App {
    public static Page GetMainPage() {
        return new MyPage();
    }
}

class MyPage : ContentPage{
    public MyPage() {

        var ar = new ObservableCollection<String>();
        foreach (var i in Enumerable.Range(0, 50)) {
            ar.Add(i.ToString());
        }
        var listView = new ListView {
            ItemsSource = ar
        };

        var button = new Button {
            Text = "OK"
        };
        button.Clicked += (sender, args) => {

            Task.Run(() => Device.BeginInvokeOnMainThread(() => {
                listView.ScrollTo(ar[10], ScrollToPosition.Start, false);
            }));
        };

        Content = new StackLayout {
            Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0),
            Children = { button, listView }
        };
    }
}
Comment 1 sin 2014-12-25 04:24:51 UTC
Created attachment 9180 [details]
A state of exception outbreak
Comment 2 Ram Chandra 2015-01-06 10:03:10 UTC
Created attachment 9252 [details]
Sample App

I have checked this issue with the help of code provided in bug description and observed that when we run the app on windows phone an exception is occured when we click on button 'OK'.

Screencast : http://www.screencast.com/t/m7NpUuZn

I am not sure how to get windows phone or windows emulator log. Please let me know if I can provide some more info.

I am attaching a sample app which I have created to reproduce this issue.

Thanks!

Environment Info:

Xamaroin.Forms 1.3.0.6292

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.8.150.0
Comment 3 Udham Singh 2015-01-06 10:05:46 UTC
Created attachment 9253 [details]
ZipXamarinLogs

An update to the above comment : Attaching ZipXamarinLogs
Comment 4 Rui Marinho 2015-01-15 07:00:46 UTC
Should be fixed in 1.3.2-pre1
Comment 5 Ram Chandra 2015-01-22 10:38:54 UTC
I have checked this issue with following builds:

Xamarin.Forms.1.3.2.6299-pre1
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641
Installed Version: Professional
Xamarin   3.9.236.0 (d6a2cae)
Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Xamarin.iOS   8.6.0.0 (eb24bdcf5cba2c12b673a07e0a8cce368b9563b3)
Xamarin.iOS Unified Migration   1.0

To verify this issue I have used the attached project which implements the code mentioned in bug description. When I press the OK button I observed the visibility of first element of list is set to false. Application is working fine without any error or exception.

Screencast: http://www.screencast.com/t/g3tZlwpcxf

This issue has been fixed. Hence I am closing this issue.
Comment 6 sin 2015-01-26 12:44:39 UTC
I confirmed that there was not a problem in 1.3.2.6299-pre1.

Thank you.