Skip to content

[net10] iOS 18.6 crashing on navigating to a ContentPage with Padding set and Content set to a <Grid RowDefinitions="*,Auto"> with ScrollView on row 0 #33595

@leonardbarbu

Description

@leonardbarbu

Description

With the .NET 10 MAUI, the app is crashing/freezing on iOS 18.6 if you want to navigate to a ContentPage with Padding="5,5,5,5" set and the page also contains in the ContentPage.Content a < Grid RowDefinitions="*,Auto" > which also contains a < ScrollView > on row 0 and any other item on row 1.

Steps to Reproduce

  1. Create new MAUI app with .NET 10 and uncheck "Include sample content"
  2. Update packages
  3. Create a new page "NewPage.xaml" with the following content:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MauiApp5.NewPage1"
             Padding="5,5,5,5"
             Title="NewPage1">

    <Grid RowDefinitions="*,Auto"
          Padding="0"
          Margin="0">

        <ScrollView Grid.Row="0">

            <VerticalStackLayout Padding="16"
                                 Spacing="12"
                                 Margin="0,0,0,88">
       
                <Label Text="Text 2" FontSize="24"/>
                <Label Text="Text lung..." />
            </VerticalStackLayout>
        </ScrollView>

        <Grid Grid.Row="1"
              Padding="16">
            <Button Text="Continue"
                    HeightRequest="52"
                    CornerRadius="12" />
        </Grid>

    </Grid>
</ContentPage>
  1. On MainPage.xaml.cs, change the content of OnCounterClicked to push in the Navigation stack the new created page:
{
        await Navigation.PushAsync(new NewPage1());
}
  1. Run the app on an iPhone 16 Pro iOS 18.6 simulator and press the clicked event

Link to public reproduction project repository

https://github.com/leonardbarbu/mauiapp5

Version with bug

10.0.30

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.110 SR11

Affected platforms

iOS

Affected platform versions

Affected iOS 18.6 on project running from Workload version 10.0.102, SDK 10.0.100, VS 18.2.11408.102, Manifest version 26.2.10191/10.0.100

Did you find any workaround?

Move padding inside the items of Grid:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MauiApp5.NewPage1"
             
             Title="NewPage1">

    <Grid RowDefinitions="*,Auto"
          Padding="0"
          Margin="0">

        <ScrollView Grid.Row="0" Padding="5,5,5,5">

            <VerticalStackLayout Padding="16"
                                 Spacing="12"
                                 Margin="0,0,0,88">
       
                <Label Text="Text 2" FontSize="24"/>
                <Label Text="Text lung..." />
            </VerticalStackLayout>
        </ScrollView>

        <Grid Grid.Row="1" Padding="5,5,5,5">
            <Button Text="Continue"
                    HeightRequest="52"
                    CornerRadius="12" />
        </Grid>

    </Grid>
</ContentPage>

Relevant log output

No errors, the app just freezes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions