Bug 43907 - iOS 10 preview Xamarin Forms ListView RecycleElement Crash on Custom Cell
Summary: iOS 10 preview Xamarin Forms ListView RecycleElement Crash on Custom Cell
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.1
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-31 16:45 UTC by AndyB
Modified: 2016-10-24 10:32 UTC (History)
11 users (show)

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


Attachments
Sample Solution (33.84 KB, application/zip)
2016-08-31 16:45 UTC, AndyB
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:
RESOLVED FIXED

Description AndyB 2016-08-31 16:45:43 UTC
Created attachment 17279 [details]
Sample Solution

There seems to be a crashing issue when you have a ListView that has custom cells and a cache strategy: ListViewCachingStrategy.RecycleElement

Attached is a sample project.  When you restore the packages and run it, it will show a list of two people.  Then uncomment the listview strategy and see that you get a white screen and then a crash on a device that is running iOS 10 Beta 8.
Comment 1 tim.ahrentlov 2016-09-06 11:56:43 UTC
A fix is becoming urgent
Comment 2 Xet 2016-09-13 06:23:10 UTC
Having a ContextAction on a custom cell produces the same error, regardless of caching strategy.
Agreeing with the previous comment: a fix is urgent.
Comment 3 Rui Marinho 2016-09-14 14:14:44 UTC
Can you please try upgrade to the latest stable we issue a hotfix for a very similar issue. I think it might be the same problem. 

Thanks
Comment 4 Marius Kahmen 2016-09-14 14:22:13 UTC
Hi Rui,

I can confirm that the hotfix works. Tested it for RecycleElement and ContextAction.

Thanks
Marius
Comment 5 Xet 2016-09-14 15:29:42 UTC
The original issue seems to be fixed but ContextAction does not work as it should.

If you swipe so that the context menu is visible on one listview item and then swipe another item (without closing the context menu on the first item), it crashes.

It raises a System.ArgumentNullException with the message:
Value cannot be null.
Parameter name: gestureRecognizer

It originates from UIKit.UIView.RemoveGestureRecognizer, from what I can tell.

This is only on iOS10. On iOS9 it works as it should.
Comment 6 Rui Marinho 2016-09-14 16:05:51 UTC
Ok, please open a new bug relative to that subject.
Comment 7 Slava Chernikoff 2016-10-24 10:32:19 UTC
I created a new bug:

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