Bug 45743 - Threading problem with PushAsync() after DisplayAlert() on iOS
Summary: Threading problem with PushAsync() after DisplayAlert() on iOS
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-10-20 14:52 UTC by Arne De Vreese
Modified: 2016-11-30 08:51 UTC (History)
4 users (show)

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

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

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:

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, and

Issue occurs on both iOS 9.3 and 10.0.
Comment 1 Samantha Houts [MSFT] 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.

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