This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 45743 - Threading problem with PushAsync() after DisplayAlert() on iOS
Summary: Threading problem with PushAsync() after DisplayAlert() on iOS
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS (show other bugs)
Version: 2.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-20 14:52 UTC by Arne De Vreese
Modified: 2016-11-30 08:51 UTC (History)
4 users (show)

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


Attachments
Test Project (197.33 KB, application/x-zip-compressed)
2016-10-20 14:52 UTC, Arne De Vreese
Details

Description Arne De Vreese 2016-10-20 14:52:35 UTC
Created attachment 18142 [details]
Test Project

## Description

When PushAsync() is called from BeginInvokeOnMainThread() immediately after DisplayAlert(), the thread calling PushAsync() hangs in iOS.

## Steps to reproduce

1. Open the attached test project and set breakpoints (3) in the OnStartup event in App.cs near the comments 'Code here is executed' and 'Code here is never executed'.

2. Launch the attached test project to an iOS device or simulator.

Expected result:

The first and second breakpoint should be hit and the device or simulator should open Page 1, show an Alert and navigate to Page 2.

Actual result:

The alert is shown and the first breakpoint, before PushAsync(), is hit, but the others aren't. No exception is thrown and the call to PushAsync() seems to 'hang' (or been aborted).

Also on the device or simulator Page 1 is still shown.

## Notes

Issue occurs in XF 2.2.0.31,  2.3.2.137 and 2.3.3.163-pre.

Issue occurs on both iOS 9.3 and 10.0.
Comment 1 Samantha Houts 2016-11-15 19:35:44 UTC
Should be fixed in 2.3.4-pre1. Thank you!
Comment 2 Parmendra Kumar 2016-11-28 11:43:02 UTC
I have checked this issue with Xamarin.Forms 2.3.4-pre1 and observed that show alert and navigate to page 2.

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

Hence closing this issue.

Please have a look screencast and let me know If I have missed anything to verify this issue.

Thanks.
Comment 3 Arne De Vreese 2016-11-30 08:51:37 UTC
It seems to work. Looking forward to the stable version.

Thanks!

Note You need to log in before you can comment on or make changes to this bug.