-
Notifications
You must be signed in to change notification settings - Fork 569
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] [WinUI 3 / MAUI, 9.0 Preview 6, SkiaSharp 3.0-preview4.1] SKGLView crashes WinUI 3 MAUI App when the app is built in the unpackaged mode #2968
Comments
@mattleibow I ran analysis on the dump using WinDbg. It says the following:
At this point, I am using Visual Studio 2022 Community Preview 17.12.0 Preview 5.0, .NET MAUI 9.0 RC2, SkiaSharp 3.118.0-Preview1.2. I have also activated Full Dump (2) in Registry Editor for the test app. |
A quick guess: before net9 we would never expect an unpackaged mode on Windows, seems it was implemented to speed up development (no idea why, windows was already the fastest platform to debug a MAUI app haha). |
@mattleibow Since Direct3D support is coming to SkiaSharp (#2823), would it be possible to add a Direct3D-accelerated view to WinUI/MAUI views to replace SKGLView, which does not work in the unpackaged mode on Windows? Or make it possible to choose a Direct3D renderer for SKGLView, which would work in the unpackaged mode (which is now default for .NET 9 apps)? |
WinUI is technically using Direct3D via the ANGLE library. ANGLE is basically a wrapper for DirectX that looks like OpenGL ES. However, we still can add views to skip this layer and draw directly. But, is this issue still occurring in unpackaged? I see the view does not have a width and height, so maybe the view is 0 height and causes a crash. I will have a look as it should be working. |
Thanks for clarifying things up. I updated the test application to .NET SDK 9.0.201, .NET MAUI 9.0.50 and SkiaSharp 3.116.1. And it's still crashing in the unpackaged mode. Is there a SkiaSharp nuget package available that uses Direct3D, since 3.116.1 is crashing when AngleSwapChainPanel is accessing SkiaSharp.Views.GlesInterop.GlesContext? I also added WidthRequest and HeightRequest to SKGLView, but they didn't help. |
Can confirm SKGLView is crashing on Windows if accessed in unpackaged mode, tried on Debug. |
Our app is a game and Steam does not support MSIX, so we must upload it there as an unpackaged version. |
OK, I will investigate. It should be working, and if not then it is a horrible case of a bug fest. |
That's much appreciated! Thank you! |
The crash is still present in:
|
Description
Technology stack
Bug
SKGLView crashes the app at runtime when .NET MAUI App is built in the unpackaged mode (
-p:WindowsPackageType=None
).Code
Steps to reproduce the bug
dotnet build -f:net9.0-windows10.0.19041.0 -c:Debug -p:WindowsPackageType=None -p:RuntimeIdentifierOverride=win10-x64 -p:WindowsAppSDKSelfContained=true
bin\Debug\net9.0-windows10.0.19041.0\win10-x64
. The unpackaged app should be there.Expected Behavior
The app would not crash at runtime.
Actual Behavior
The app crashes in the OnLoaded event of AngleSwapChainPanel at runtime.
Version of SkiaSharp
3.x (Alpha)
Last Known Good Version of SkiaSharp
Other (Please indicate in the description)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Windows
Platform / Operating System Version
Edition Windows 11 Pro
Version 23H2
OS build 22631.3958
Experience Windows Feature Experience Pack 1000.22700.1026.0
Devices
Processor 13th Gen Intel(R) Core(TM) i9-13980HX 2.20 GHz
Installed RAM 32,0 GB (31,6 GB usable)
System type 64-bit operating system, x64-based processor
Relevant Screenshots
No response
Relevant Log Output
Code of Conduct
The text was updated successfully, but these errors were encountered: