-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] [iOS] Change Device Orientation Causes Crash #15232
Comments
Hey @melvyniandrag, a PR (#15300) for this is open now, would you be able to grab the NuGet as described here and let us know if this fixes this issue? That will greatly speed up the review process. Make sure to grab the actual version mentioned in the PR, other versions on that feed will not include this fix. Besides verifying if this particular issue is fixed also be sure to check other scenarios in the same area to make sure that this fix doesn't accidentally has side-effects 🙂 Thanks! |
Hi @jfversluis thanks for giving this some attention. Unfortunately this patch does not resolve the issue and might make the situation worse. There is still a bug when changing the device orientation from portrait -> landscape. landscapeWontLaunch.txt Attached are the logs for the two issues. The landscape log is very long, but near the end it just repeats this error message: |
Hello again, and just as a sanity check I am showing my installed Nuget packages, which shows version 5.0.0.8133, which[ is the version indicated here in the Pull Request](https://github.com/xamarin/Xamarin.Forms/pull/15300/checks?check_run_id=5886717107 |
Hehe ok so far for my fix attempt then, sorry! Need to do further investigation :) Thanks for testing! |
I've tried on the 5.0.0.2401 and the issue is still there. |
My workaround is:
|
Hi @procopio Thanks for the workaround! Unfortunately the workaround above isn't a great solution for me and my team. We'll consider factoring this into our app, but a cleaner platform-agnostic solution would be much preferred. Thanks again guys I'll keep an eye on this issue. |
Description
Rotating screen with a CollectionView causes crash along with an error about VerticalCell.Measure. By tweaking the code I have been able to produce other errors, but all are related to Xamarin.iOS and something to do with the CollectionView. Note: Also crashes a ListView.
This issue was documented by @procopio and @KarlSearl in 2020, but the ticket was closed. See ticket #10733.
Steps to Reproduce
Download the tiny sample code I linked below, compile, run, and rotate the screen on your ios device (I'm testing on an iPhone 11 ). The app crashes. Please see the short video I put on youtube demoing the crash.
-OR-
Expected Behavior
Items on screen should reorganize themselves as I specify in OnSizeAllocated. This is the behavior on Android, Windows10, and Windows11.
Actual Behavior
App works on Android and Windows, but crashes on iOS.
Basic Information
Environment
Show/Hide Visual Studio info
Screenshots
Better that a Screenshot, here is a video showing the crash
Reproduction Link
Here is a tiny repo illustrating the issue
Workaround
No work around yet.
The text was updated successfully, but these errors were encountered: