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

[BUG] .Net MAUI 9.0 Windows platform application crashes when using the SKGLView control #3113

Closed
wzy9089 opened this issue Dec 12, 2024 · 5 comments
Labels

Comments

@wzy9089
Copy link

wzy9089 commented Dec 12, 2024

Description

dotNet 9.0 Maui application using SKGLView throw System.ExecutionEngineException
HResult=0x80131506

Call stack screenshot
屏幕截图 2024-12-12 132156

Code

The best way to share code for larger projects is a link to a GitHub repository: https://github.com/user/repo/tree/bug-123

But, you can also share a short block of code here:

// some C# code here

You can also share some XAML:

<!-- xaml code here -->
<?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"
             xmlns:skia="clr-namespace:SkiaSharp.Views.Maui.Controls;assembly=SkiaSharp.Views.Maui.Controls"
             x:Class="MauiGLCanvasTest.MainPage">

    <Grid>
        <skia:SKGLView PaintSurface="SKGLView_PaintSurface"/>
    </Grid>
</ContentPage>


### Expected Behavior

_No response_

### Actual Behavior

_No response_

### Version of SkiaSharp

3.118.0-preview.2 (Next Preview)

### Last Known Good Version of SkiaSharp

2.88.9 (Previous)

### IDE / Editor

Visual Studio (Windows)

### Platform / Operating System

Windows

### Platform / Operating System Version

windows 11

### Devices

thinkpad t14p with intel ultra9 185h cpu

### Relevant Screenshots

_No response_

### Relevant Log Output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@wzy9089
Copy link
Author

wzy9089 commented Dec 12, 2024

It's different from those two issues, this issue only occurs when using SKGLView

@wzy9089 wzy9089 changed the title [BUG] <title>The Maui Windows platform application crashes when using the SKGLView control [BUG] .Net9 The Maui Windows platform application crashes when using the SKGLView control Dec 12, 2024
@wzy9089 wzy9089 changed the title [BUG] .Net9 The Maui Windows platform application crashes when using the SKGLView control [BUG] .Net MAUI 9.0 Windows platform application crashes when using the SKGLView control Dec 12, 2024
@TommiGustafsson-HMP
Copy link

TommiGustafsson-HMP commented Dec 13, 2024

Please use packaged mode. .NET 9 defaults to unpackaged.

Here's the issue about this problem: #2968

Essentially, you need <WindowsPackageType>MSIX</WindowsPackageType> in csproj and "commandName": "MsixPackage" in launchSettings.json.

@wzy9089
Copy link
Author

wzy9089 commented Dec 17, 2024

Problem solved, thank you very much!:)

@TommiGustafsson-HMP
Copy link

Great, you can then close this issue!

@wzy9089 wzy9089 closed this as completed Dec 17, 2024
@github-project-automation github-project-automation bot moved this from New to Done in SkiaSharp Backlog Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants