This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 42651 - Pushing a page on the navigation stack while device is rotating crashes the app
Summary: Pushing a page on the navigation stack while device is rotating crashes the app
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.3.1
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-07-19 02:22 UTC by adrianknight89
Modified: 2017-02-02 16:49 UTC (History)
6 users (show)

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


Attachments
repro (903.56 KB, application/zip)
2016-07-19 02:22 UTC, adrianknight89
Details

Description adrianknight89 2016-07-19 02:22:41 UTC
Created attachment 16712 [details]
repro

Tested this on iOS 9 & XF 2.3.1.111-pre2 

I tried to push a page on the navigation stack while the device is changing orientation, but this crashes the app immediately. If I put a delay and wait till the screen layout changes, pushing the page works fine.

Please see repro.

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.

The app has been terminated.
2016-07-18 21:11:26.504 App4iOS[1404:830014] 
Unhandled Exception:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
  at System.ThrowHelper.ThrowInvalidOperationException (System.ExceptionResource resource) [0x00000] in /Users/builder/data/lanes/1381/3afb4af5/source/maccore/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/throwhelper.cs:99 
  at System.Collections.Generic.List`1+Enumerator[T].MoveNextRare () <0x10016ff70 + 0x0002f> in <filename unknown>:0 
  at System.Collections.Generic.List`1+Enumerator[T].MoveNext () <0x10016fea0 + 0x0009f> in <filename unknown>:0 
  at Xamarin.Forms.Page.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00119] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Page.cs:167 
  at Xamarin.Forms.Page.UpdateChildrenLayout () [0x000d0] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Core\Page.cs:252 
  at Xama
The app has been terminated.
Comment 1 adrianknight89 2016-12-05 02:40:54 UTC
https://github.com/xamarin/Xamarin.Forms/pull/607
Comment 2 Rui Marinho 2016-12-06 12:13:09 UTC
Should be fixed in 2.3.4-pre2
Comment 3 Mohit Kheterpal 2017-02-02 16:49:22 UTC
I have checked this issue and observed that this issue has been fixed in xamarin.forms 2.3.4.184-pre1.

Hence, closing this issue by marking it as Verified.

thanks

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