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
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS (show other bugs)
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)

See Also:
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

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 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.


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.


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