SkiaSharp: [BUG] SkiaSharp crashes application MAUI

having

namespace SkiaUI;

public partial class MainPage : ContentPage
{
	public MainPage()
	{
		InitializeComponent();
		Content = new SkiaSharp.Views.Maui.Controls.SKCanvasView();
	}
}

causes MAUI App (Preview) to crash at startup with unhandled exception in debugger

commenting out Content = new SkiaSharp.Views.Maui.Controls.SKCanvasView(); makes the error go away but then we have no Skia View

how can this be worked around?

Project That Crashes SkiaUI.zip

im using

Visual Studio 2022 Windows - Version 17.2.0 Preview 2.0

C:\Users\matthew good\.nuget\packages\microsoft.graphics.win2d\1.0.0.30\
C:\Users\matthew good\.nuget\packages\microsoft.maui.dependencies\6.0.200-preview.14.5099\
C:\Users\matthew good\.nuget\packages\microsoft.maui.extensions\6.0.200-preview.14.5099\
C:\Users\matthew good\.nuget\packages\microsoft.windowsappsdk\1.0.0\
C:\Users\matthew good\.nuget\packages\skiasharp.views.maui.controls\2.88.0-preview.232\

EDIT: now having SkiaSharp.Views.Maui.Controls.SKGLView crashes the application, even if SKCanvasView does not crash

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 20 (15 by maintainers)

Most upvoted comments