Bug 45827 - ListView crash when swipe item1 and click item2
Summary: ListView crash when swipe item1 and click item2
Status: RESOLVED DUPLICATE of bug 44338
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.2.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-24 10:11 UTC by Slava Chernikoff
Modified: 2016-10-24 17:32 UTC (History)
4 users (show)

Tags: listview, crash, swipe, gesture
Is this bug a regression?: ---
Last known good build:


Attachments
ListView Crash sample (167.11 KB, application/x-zip-compressed)
2016-10-24 10:11 UTC, Slava Chernikoff
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 DUPLICATE of bug 44338

Description Slava Chernikoff 2016-10-24 10:11:06 UTC
Created attachment 18187 [details]
ListView Crash sample

Simple but VERY IMPORTANT issue with ListView on iOS:

1. Add context action to ViewCell
2. Swipe on one cell
3. Tap on another cell
4. App crash with Exception:

System.ArgumentNullException: Value cannot be null.
Parameter name: gestureRecognizer

Stacktrace from Hockeyapp:

Parameter name: gestureRecognizer
UIKit.UIView.RemoveGestureRecognizer(UIGestureRecognizer gestureRecognizer)
Xamarin.Forms.Platform.iOS.ContextScrollViewDelegate.ClearCloserRecognizer(UIScrollView scrollView)
Xamarin.Forms.Platform.iOS.ContextScrollViewDelegate.<>c__DisplayClass24_0.<WillEndDragging>b__0()
UIKit.UIGestureRecognizer.ParameterlessDispatch.Activated()
ObjCRuntime.Messaging.objc_msgSend(intptr, intptr, intptr)(wrapper managed-to-native)
UIKit.UIView.RemoveGestureRecognizer(UIGestureRecognizer gestureRecognizer)
Xamarin.Forms.Platform.iOS.ContextScrollViewDelegate.ClearCloserRecognizer(UIScrollView scrollView)
Xamarin.Forms.Platform.iOS.ContextScrollViewDelegate.<>c__DisplayClass24_0.<WillEndDragging>b__0()
UIKit.UIGestureRecognizer.ParameterlessDispatch.Activated()
UIKit.UIApplication.UIApplicationMain(int, string[], intptr, intptr)(wrapper managed-to-native)
UIKit.UIApplication.Main(string[] args, string principalClassName, string delegateClassName)
Instamart.iOS.Application.Main(string[] args)

I tested it on XF 2.2 and higher - all versions affected (I guess older versions too).

It seems like an issue with https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/ContextScrollViewDelegate.cs

RemoveGestureRecognizer in ClearCloserRecognizer called from WillEndDragging without any NULL checks :(

Please fix it urgently if possible.
Comment 1 bblonchek 2016-10-24 12:30:00 UTC
I can attest of have the same issue
Comment 2 Paul DiPietro [MSFT] 2016-10-24 17:32:13 UTC

*** This bug has been marked as a duplicate of bug 44338 ***