-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Managed vtable types (ie. containing any reference types) are not supported. (With WindowsSdkPackageVersion 10.0.19041.38) #2999
Comments
Things I tried.
The only thing that helped was removing Because with .NET 8.0.402 the WindowsSdkPackageVersion is updated to something that works with Windows AppSDK 1.6 This error could become quite common. Affecting Maui, Uno (WinUI Target), WinUI Or is this a Bug in the WindowsAppSDK itself? The Problem seems to be here, in The GetPixels function. Could this be fixed by this Commit 9fde53e |
I managed to Compile SkiaSharp locally and confirm that it works now, so this Bug was indeed fixed, But needs a SkiaSharp nuget Release. |
@mattleibow This fix would also need to be backported to 2.x, ideally. Thanks! |
I think this pull request needs to be back ported |
And this is the issue |
I made an App in ,NET MAUI (8.0.91) that communicate with my BLE device and uses SkiaSharp and it works very well on Android and iOS. When I try to run it on Windows, and SkiaSharp get involved, it crashes and Visual Studio shows the dialog to select a debugger. I use the following NuGet packages: SkiaSharp.Views.Maui.Controls ver. 3.0.0-preview.4.1 In order to use CommunityToolkit.Mvvm ver. 8.3.2, I put the following tag to the project file: Here the errors Log: 2024-09-26 17:42:34.972 [MauiUnhandledExceptionManager] FirstChanceException caught: Managed vtable types (ie. containing any reference types) are not supported. 2024-09-26 17:42:34.974 [MauiUnhandledExceptionManager] 2024-09-26 17:42:34.975 [MauiUnhandledExceptionManager] FirstChanceException caught: Exception has been thrown by the target of an invocation. 2024-09-26 17:42:34.976 [MauiUnhandledExceptionManager] The program '[21316] MYAPPNAME.exe: Program Trace' has exited with code 0 (0x0). |
@Auto72 to fix your issue either use winappsdk 10.0.19041.34 (anything lower than .38) or get the patched update from their azure build servers (there is no nuget release yet) |
@Bush-cat I used the winappsdk 10.0.19041.34 and I reverted to use the NuGet library CommunityToolkit.Mvvm ver 8.2.2 and now my App works also on Windows. |
Can you try the latest nightly on |
@mattleibow I tried my app using the latest nightly build of SkiaSharp on Windows: SkiaSharp.Views.Maui.Controls ver. 3.0.0-preview.5.3 I also used the NuGet library CommunityToolkit.Mvvm ver. 8.3.2 And in the project file I added: and now it works 🥳🥳🥳 |
@mattleibow I can also confirm that 3.0.0-preview.5.3 is working on WinAppSDK 1.6. |
@mattleibow, Yes I can confirm that it works now. (SkiaSharp.Views.WinUI 3.0.0 on WindoAppSDK 1.6) |
3.0.0-preview.5.3 works! |
3.0.0-preview.5.3 works for me too. |
I've been fighting with this issue for whole evening now. I don't even know how this happened to me. I was implementing some Microsoft Store features and suddenly my app started crashing. Yesterday everything worked fine. Stashing all changes and clean build and stuff does not help. Also the workarounds mentioned above do not help. DId I get some secret update that I'm not aware or did my windows update? |
This is in the release notes for 17.11.5: "Updated the Windows 11 SDK (10.0.26100.0) installed by Visual Studio to the October 2024 servicing build." I was able to workaround this by adding this to my .csproj: |
Ah, thank you very much, that worked. At least I won't waste another evening with this |
3.0.0-preview.5.3 resolves my issue! Temporarily adding this to my csproj works, too:
|
Where can I get the 3.0.0-preview.5.3? It's not on the nuget servers which only go until 4.1. Can I only get that from the nightly build server? Furhter more, is there a release timeline for version 3.0? If that is far away, will this be backported? |
You need the nightly builds as nuget-feed: |
@TopperDEL Thanks for the quick response. It is much appreciated. |
It works :) |
While on VS2022 version '17.11.5', is it correct that I'm to keep the After doing so, when trying to run my app or the LiveCharts WinUI sample app, I receive a different error Also, when adding the following to the csproj file |
@core2lord Because the latest version of LiveCharts is not running on SkiaSharp 3, you need to build #1622 to fix that. |
@beto-rodriguez wow, you are on top of it thank you for such quick reply. I've |
@core2lord you just cloned the master repo and updated the skiasharp dependency? |
Is there any idea on when this will be released? This will also be a problem when updating to .Net 9 later this year. |
This issue has broken my MapsUI application on windows 11. Hope this fix is released soon. I tried with the pre-release, but it doesn't seem to be completely ready yet, as it just led to other errors. |
Same it broke my mapsui. |
I pushed out a new version of SkiaSharp which should have all the WASDK fixes in it. |
Closing this for now as the issue is fixed for both v2 and v3 in the latest preview. |
Description
In this pull request I try to Update the WindowsAppSDK Dependency to 1.6.240829007
Mapsui/Mapsui#2747
This needs following Entry in the csproj File
Which in Turn causes Managed vtable types (ie. containing any reference types) are not supported
What I discovered is that adding alone without Updating WindowsAppSdk Causes this Exception so it is a Behavior change
In the Windows App SDK Ref starting around 10.0.x.38 Versions.
Sample the Reproduces the Crash, should display a circle could not test it it crashed before it can display anything.
From the Callstack it seems Code that is executed in SKXamlCanvas.DoInvalidate crashes the Application
App1.zip
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 -->
Expected Behavior
No exception and SkiaSharp Works with WindowsAppSdk 1.6
Actual Behavior
SkiaSharp Crashes with Exception of "Which in Turn causes Managed vtable types (ie. containing any reference types) are not supported"
Version of SkiaSharp
2.88.3 (Current)
Last Known Good Version of SkiaSharp
None
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Windows
Platform / Operating System Version
Windows 11, Visual Studio 2022 Preview 17.12
Devices
Windows Packaged Windows App
Relevant Screenshots
Call Stack of Exception in the IDE.

Relevant Log Output
The text was updated successfully, but these errors were encountered: