-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[mono][ios] ToFrozenSet
crashes on iOS devices with 8.0.3
release
#101427
Comments
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos |
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 CommunityToolkit/Maui#1829 on it. |
Yeah exactly. Agreed. |
Fixed in .NET 8.0.7 |
.NET 8.0.7 has fixed an issue with the use of ToFrozenSet, more info dotnet/runtime#101427.
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: #97850Analysis
The problem seems to be related to the fact that the problematic backport actually needs #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:
CommunityToolkit/Maui#1752
CommunityToolkit/Maui#1768
MudBlazor/MudBlazor#6558
The text was updated successfully, but these errors were encountered: