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

On iOS, .NET 9.0 Preview 3 corrupts SkiaSharp 3.0 Preview 2.1 memory after a while #101327

Closed
janne-hmp opened this issue Apr 20, 2024 · 2 comments
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Comments

@janne-hmp
Copy link

janne-hmp commented Apr 20, 2024

Description

When I upgrade my app to .NET 9.0 Preview 3 on iOS, memory of SkiaSharp 3.0 Preview 2.1 gets corrupted after a while. SkiaSharp stops working and just draws a black canvas in the end. This is the same as mono/SkiaSharp#2840 in SkiaSharp repository.

This may have something to do with dotnet/android#9153 and the possibly InvariantGlobalization workaround still corrupting the memory on iOS.

Reproduction Steps

  1. Close GnollHack repository (https://github.com/hyvanmielenpelit/GnollHack)
  2. Make sure you are using .NET 9.0 Preview 3
  3. Build GnollHackX for iOS using the instructions in the wiki
  4. Build then GnollHackM (Maui project) for iOS
  5. Start the game. After playing the game for c. 1 minute (opening various different screens, inventory, menus etc.), the memory starts to get corrupted and most canvases are drawing only black or garbage.

Expected behavior

Game works as in .NET 9.0 Preview 2 without memory corruption.

Actual behavior

SkiaSharp's memory get corrupted and it stops working.

Regression?

Yes, this used to work in .NET 9.0 Preview 2.

Known Workarounds

None, have to use .NET 9.0 Preview 2.

Configuration

.NET MAUI 9.0.100-preview.3.24204.13
iOS 17.4.1, iPad 11,7
No idea if it is specific, most likely not.

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 20, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 20, 2024
@janne-hmp
Copy link
Author

janne-hmp commented Apr 20, 2024

I might add that the .NET MAUI iOS workload feed has been broken in .NET 9.0 Preview 3 and the relevant packages have been loaded by using the following NuGet configuration (in the case this is relevant):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <!-- <add key="local" value="artifacts" /> -->
    <add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" protocolVersion="3" />
    <add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" protocolVersion="3" />
    <add key="benchmark-dotnet-prerelease" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/benchmark-dotnet-prerelease/nuget/v3/index.json" />
    <add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
    <add key="dotnet8-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json" />
    <add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
    <add key="dotnet9-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
  </packageSources>
  <activePackageSource>
    <add key="All" value="(Aggregate source)" />
  </activePackageSource>
  <disabledPackageSources />
</configuration>

It seems to load some -p4 packages, so not sure if there's a further problem there.

@janne-hmp
Copy link
Author

Need some further work here. This seems to be happening also with .NET 9.0 Preview 2 on iOS.

@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Apr 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

No branches or pull requests

1 participant