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

WinUI3 : SKSwapChainPanel Works fine on .Net 7.0 where as it crashes on .Net 8.0 #2958

Open
1 task done
AmitParmar2005 opened this issue Jul 27, 2024 · 5 comments
Open
1 task done
Labels

Comments

@AmitParmar2005
Copy link

Description

Create a small testing app which uses SKSwapChainPanel.
Here's what I am using:
Visual Studio 2022.
WinUI 3
SkiaSharp - 3.0.0 Preview 4.1
SkiaSharp.View.WinUI 3.0.0-Preview 4.1
.Net 8

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 -->

<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top">
    <skia:SKSwapChainPanel Name="canvas" Height="900" Width="1200">   
    </skia:SKSwapChainPanel>
    <Button Name="myButton" Click="myButton_Click">Click Me</Button>
</StackPanel>

Expected Behavior

Should run without any issue. It should display window.

Actual Behavior

Gets an exception on .Net Version 8.0
Works fine on .Net Version 7.0

image

Full Stack Trace:
image

Version of SkiaSharp

3.x (Alpha)

Last Known Good Version of SkiaSharp

2.88.2 (Previous)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

Windows 10

Devices

Laptop:
Intel i7 processor, NVidia Graphics Card

Relevant Screenshots

image

image

The same code works fine with .Net 7.0
image

Relevant Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@AmitParmar2005
Copy link
Author

Please let me know if you want me to upload whole solution. It's just a simple application with SKSwapChainPanel in it.

@TommiGustafsson-HMP
Copy link

Is this an unpackaged app? Because I encountered a similar error here:
dotnet/maui#23737

@AmitParmar2005
Copy link
Author

It fails regardless of Packaged App or without Packaged App. I have attached sample project. Can somebody please try and confirm?

I tried deleting bin, obj folder. I also tried to uninstalled app and re-deployed the packages but nothing seems working.

WinUI_SKLmnsCanvas_Net8.zip

@AmitParmar2005
Copy link
Author

Is this an unpackaged app? Because I encountered a similar error here: dotnet/maui#23737

Sorry Friends, I take my words back. It works fine for unpacked WinUI 3 application, regardless of .net version (works on both .net 7 & .net 8). However, It crashes for packaged application. Tommi is right.

@FoggyFinder
Copy link
Contributor

any updates?
logs shows "Error loading EGL entry points: libGLESv2.dll" message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready For Work
Development

No branches or pull requests

3 participants