Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[regression/8.0.0-preview.5.8529] [MAUI] The 'New Recipe' page will crash in landscape mode on iOS simulator #17208

Closed
ZackYangyang opened this issue Sep 5, 2023 · 9 comments
Labels
high It doesn't work at all, crashes or has a big impact. i/regression This issue described a confirmed regression on a currently supported version platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@ZackYangyang
Copy link

ZackYangyang commented Sep 5, 2023

Description

The 'New Recipe' page will crash in landscape mode.

Steps to Reproduce

1.Download the project https://github.com/rachelkang/recipeSearch and Locate it.
2.Tap on the 'My Recipes' tab to navigate to the 'My Recipes' page.
3.Tap on the 'New' button in the upper right-hand corner of the page to navigate to the 'New Recipe' page.
4.Rotate the emulator clockwise (to the right) to the landscape mode.

Actual result:
The 'New Recipe' page will crash in landscape mode
![image](https://github.com/dotnet/maui/assets/82210619/2b390281-8583-49bc-aeae-537c20f48ff3

Link to public reproduction project repository

https://github.com/rachelkang/recipeSearch

Version with bug

8.0.0-preview.5.8529

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.0-preview.4.8333

Affected platforms

iOS

@ZackYangyang ZackYangyang added the t/bug Something isn't working label Sep 5, 2023
@QianaJiao QianaJiao added the i/regression This issue described a confirmed regression on a currently supported version label Sep 5, 2023
@samhouts samhouts added platform/iOS 🍎 high It doesn't work at all, crashes or has a big impact. labels Sep 5, 2023
@samhouts samhouts added this to the .NET 8 GA milestone Sep 5, 2023
@rachelkang
Copy link
Member

Tested and I'm able to reproduce this issue in preview7, so it is not a p7 to rc1 regression

@ZackYangyang
Copy link
Author

ZackYangyang commented Sep 6, 2023

We performed supplementary tests to verify the regression:
Repro this issue when use Microsoft.Maui.Controls 8.0.0-nightly.9158+sha.cad4279216-azdo.8352477 on .NET8 RC1/Preview7.
Repro this issue when use Microsoft.Maui.Controls 8.0.0-preview.7.8842 on .NET8 RC1/Preview7.

@drasticactions
Copy link
Contributor

drasticactions commented Sep 6, 2023

The complete stacktrace is

System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController`1[[Microsoft.Maui.Controls.CarouselView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].InvalidateMeasureIfContentSizeChanged()
    at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController`1[[Microsoft.Maui.Controls.CarouselView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ViewWillLayoutSubviews()
    at Microsoft.Maui.Controls.Handlers.Items.CarouselViewController.ViewWillLayoutSubviews()
    at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName)    at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
    at Recipes.Program.Main(String[] args) in X:\Code\Work\recipeSearch\WhatToEat\Platforms\iOS\Program.cs:line 12} | System.NullReferenceException

And it seems specific to some devices and dimentions. It works on an iPhone 14, but not an iPhone 14 Pro Max.

And like @rachelkang, it happens in P7 too on the iPhone 14 Pro Max.

@PureWeen PureWeen removed the i/regression This issue described a confirmed regression on a currently supported version label Sep 6, 2023
@samhouts samhouts added the potential-regression This issue described a possible regression on a currently supported version., verification pending label Sep 7, 2023
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Sep 8, 2023
@XamlTest
Copy link

XamlTest commented Sep 8, 2023

Verified this on Visual Studio Enterprise 17.8.0 Preview 1.0 using below Project (8.0.0-preview.7.8842), This issue repro on
iPhone 14 Pro Max and iPhone 14 Pro , not repro on iPhone 14.
recipeSearch.zip

Repro project:
iPhone 14 Pro Max
image
iPhone 14
image

@DDHSchmidt
Copy link

Guys, we can now reliably reproduce this crash with the exact same stacktrace on our app.
This worked fine on Preview 7 and is now crashing constantly on RC 1. Is there a hidden agenda in Microsoft to make the experience continuously worse on iOS?
I thought progressing versions should improve the stability, not reduce it?

Reliably crashing with an iPad Pro (10.5 inches) on iOS 16.6.1

@samhouts samhouts changed the title [MAUI] The 'New Recipe' page will crash in landscape mode on iOS simulator [regression/8.0.0-preview.2.7871] [MAUI] The 'New Recipe' page will crash in landscape mode on iOS simulator Sep 13, 2023
@samhouts samhouts added i/regression This issue described a confirmed regression on a currently supported version and removed potential-regression This issue described a possible regression on a currently supported version., verification pending labels Sep 13, 2023
@samhouts samhouts changed the title [regression/8.0.0-preview.2.7871] [MAUI] The 'New Recipe' page will crash in landscape mode on iOS simulator [regression/8.0.0-preview.5.8529] [MAUI] The 'New Recipe' page will crash in landscape mode on iOS simulator Sep 13, 2023
@samhouts
Copy link
Member

Confirmed that this regressed between 8.0.0-preview.4.8333 and 8.0.0-preview.5.8529. This new code path was added in #14951. This PR was backported to NET 7 (unreleased), so the fix has to go in NET 7, too.

@QianaJiao
Copy link

Verified this bug was fixed and not repro.
VSMac: 17.6.4 (17.6 build 472)
Microsoft.Maui.Controls: 8.0.0-nightly.9210+sha.39220c89b6-azdo.8394631
NET SDK: 8.0.100-rc.1.23455.8

@samhouts
Copy link
Member

@QianaJiao I think you may have used a smaller simulator or device to test. This is still an issue on larger devices, like iPhone 14 Pro Max.

@PureWeen
Copy link
Member

tracking additional work here

@PureWeen PureWeen moved this from Todo to Done in MAUI SDK Ongoing Sep 24, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
high It doesn't work at all, crashes or has a big impact. i/regression This issue described a confirmed regression on a currently supported version platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants