Open ivanpovazan opened 1 week ago
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos See info in area-owners.md if you want to be subscribed.
Smaller repro with a full AOTed console app (that crashes with 8.0.3 release):
using System;
using System.Collections.Generic;
using System.Collections.Frozen;
namespace HelloWorld
{
internal class Program
{
private static void Main(string[] args)
{
try
{
var people = new List<Person>()
{
new Person("John")
};
foreach (var frozenPerson in people.ToFrozenSet())
{
Console.WriteLine($"Element in frozen set has: {frozenPerson.Name} name");
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
}
class Person
{
public Person(string name) => Name = name;
public string Name { get; set; }
}
}
FWIW, CommunityToolkit should not be using FrozenSet in the first place. I have filled https://github.com/CommunityToolkit/Maui/issues/1829 on it.
FWIW, CommunityToolkit should not be using FrozenSet in the first place. I have filled https://github.com/CommunityToolkit/Maui/issues/1829 on it.
Yeah exactly. Agreed.
Description
With
8.0.3+
servicing release if an iOS app usesToFrozenSet
directly (or through some dependencyCommunityToolkit
) the app crashes with something like:Regression
Yes, this is a regression compared to
8.0.2
servicing release, and is caused by this backport: https://github.com/dotnet/runtime/pull/97850Analysis
The problem seems to be related to the fact that the problematic backport actually needs https://github.com/dotnet/runtime/pull/94787 also to be backported in order to work properly. @kotlarmilos could you issue the backport?
This is not reproducible on the main (.NET9) branch because we have the both changes (linked above) merged in.
Known workarounds
Reported as issue
Originally reported in various places: https://github.com/CommunityToolkit/Maui/issues/1752 https://github.com/CommunityToolkit/Maui/issues/1768 https://github.com/MudBlazor/MudBlazor/issues/6558