Bug 43328

Summary: DisplayActionSheet() double-tap NullReferenceException crash Win8.1
Product: Forms Reporter: aculliney
Component: FormsAssignee: Bugzilla <bugzilla>
Status: RESOLVED FIXED    
Severity: major CC: jas, paul.dipietro, sahou
Priority: Normal    
Version: 2.3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Tags: ac Is this bug a regression?: ---
Last known good build:
Attachments: Shows ActionSheet ready for spammy touch

Description aculliney 2016-08-13 02:22:51 UTC
Created attachment 17017 [details]
Shows ActionSheet ready for spammy touch

We have created a reduced test case project that shows a crash in DisplayActionSheet() on Win8.1.  Please see our public repository with the test case : https://bitbucket.org/luminixinc/actionsheetcrash81 .

The best way to reproduce the crash is to spam the central button that calls DisplayActionSheet() and hope you can also hit an action sheet item at least twice with your tapping.

Our app is currently hitting this issue in the wild for a number of clients who are inadvertently double-tapping an action sheet selection.  

We are not aware of any way to work around this issue at present time while still using the action sheet, due to it completely managing the ItemClick handler for us.  We believe the cause of the crash is likely setting the inner _currentActionSheet to null at line 646 in Xamarin.Forms.Platform.WinRT/Platform.cs (https://github.com/xamarin/Xamarin.Forms/blob/release-2.3.1/Xamarin.Forms.Platform.WinRT/Platform.cs#L646).  You may wish to add some delay there to try to make the test case more easily reproducible.

Regards,
Comment 1 Samantha Houts [MSFT] 2016-08-17 18:42:14 UTC
Should be fixed in 2.3.3-pre1. Thank you!
Comment 2 aculliney 2016-09-12 17:37:15 UTC
Thank you Samantha!

For posterity, our test case has now moved to https://bitbucket.org/luminixinc/xamarintest/branch/ActionSheetCrash81