Bug 60501 - Exception thrown when setting ViewCell Height on Refresh (ListView)
Summary: Exception thrown when setting ViewCell Height on Refresh (ListView)
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.5.0
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-02 17:11 UTC by Jake Barrow
Modified: 2017-11-14 01:09 UTC (History)
3 users (show)

Tags: listview, onbindingcontextchanged, nsinternalconsistencyexception, ac
Is this bug a regression?: ---
Last known good build:


Attachments
Sample Solution to reproduce the exception (146.16 KB, application/zip)
2017-11-02 17:11 UTC, Jake Barrow
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 for Bug 60501 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Jake Barrow 2017-11-02 17:11:50 UTC
Created attachment 25547 [details]
Sample Solution to reproduce the exception

When loading a ListView with a Custom cell DataType and using RecycleElement, setting the Height of the cell works as expected.

However when you pull-to-refresh the ListView (after it's already been loaded) an exception occurs when you try to set the Height of the ViewCell in the OnBindingContextChanged method.

Steps to reproduce:

1. Open the attached solution

2. Run the ListViewBug.iOS project on an iOS device (not sure if this occurs in Simulator as well)

3. Wait for the ListView to load the first time

4. Pull down to refresh the ListView once it's loaded.


Is this a bug in Xamarin or is it something wrong with my code? I don't think it's something with my code (although it might not be a standard code-flow) because it works fine if we don't try to set the cell height. And also setting the Cell Height works fine on initial load, it's only on refresh when this error occurs.
Comment 1 Paul DiPietro [MSFT] 2017-11-02 17:53:01 UTC
I will set this as confirmed for now until this can be investigated further to determine a deeper cause but I think the root cause could be related to 59974.