Description
Scrolling a ScrollView to either extreme kills the process with a native SIGSEGV on the render thread, when the ScrollView contains a WebView that is currently scrolled out of view.
It also crashes on back navigation, not just scrolling.
Works on 10.0.60, crashes on 10.0.100.
Steps to Reproduce
- New MAUI app on Microsoft.Maui.Controls 10.0.100.
- Replace MainPage with the code below.
- Deploy to Android and fling to the bottom or the top.
- App will crash
MainPage.xaml
<?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="MauiWebViewCrash.MainPage">
<ScrollView>
<VerticalStackLayout x:Name="ContentStack" Padding="12" Spacing="12" />
</ScrollView>
</ContentPage>
MainPage.xaml.cs
namespace MauiWebViewCrash;
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
AddFiller(50);
// Single WebView, mid-list, so it is off screen at both extremes.
ContentStack.Add(new WebView
{
HeightRequest = 220,
Source = new HtmlWebViewSource
{
Html = "<html><body style='background:#d6e4ff'><h3>WebView</h3></body></html>"
}
});
AddFiller(50);
}
private void AddFiller(int rows)
{
for (int i = 1; i <= rows; i++)
{
ContentStack.Add(new Label { Text = $"Filler row {i}", FontSize = 20 });
}
}
}
Link to public reproduction project repository
No response
Version with bug
10.0.100
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
10.0.60
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
WebViewHandler.Mapper.AppendToMapping("SoftwareLayer", (handler, _) =>
handler.PlatformView.SetLayerType(Android.Views.LayerType.Software, null));
Relevant log output
Description
Scrolling a ScrollView to either extreme kills the process with a native SIGSEGV on the render thread, when the ScrollView contains a WebView that is currently scrolled out of view.
It also crashes on back navigation, not just scrolling.
Works on 10.0.60, crashes on 10.0.100.
Steps to Reproduce
MainPage.xaml
MainPage.xaml.cs
Link to public reproduction project repository
No response
Version with bug
10.0.100
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
10.0.60
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
Relevant log output