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

[Windows, 3.0 Preview 3.1] SkiaSharp throws exception using .NET MAUI 9.0 Preview 6 in Microsoft Store certification #2948

Closed
1 task done
janne-hmp opened this issue Jul 18, 2024 · 1 comment
Labels

Comments

@janne-hmp
Copy link

janne-hmp commented Jul 18, 2024

Description

We are trying to get our game to Microsoft Store. It works fine on all our Windows computers (including servers), but during the certification process in Microsoft Store, it throws the following exception in SkiaSharp:

System.Runtime.InteropServices.COMException: Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
System.TypeInitializationException: The type initializer for 'SkiaSharp.Views.WinUI.Native.PropertySetExtensions' threw an exception.
  ?, in IObjectReference PropertySetExtensions.get__objRef_global__SkiaSharp_Views_WinUI_Native_IPropertySetExtensionsStatics()
  ?, in void PropertySetExtensions.AddSingle(PropertySet propertySet, string key, float value)
  ?, in void GlesContext.CreateSurface(SwapChainPanel panel, Size? renderSurfaceSize, float? resolutionScale)
  ?, in void AngleSwapChainPanel.EnsureRenderSurface()
  ?, in void AngleSwapChainPanel.OnSizeChanged(object sender, SizeChangedEventArgs e)

This seems to be related to AngleSwapChainPanel.cs in SkiaSharp.Views.WinUI and GlesContext.cs in SkiaSharp.Views.WinUI\GlesInterop. In the latter, the lines

    if (resolutionScale.HasValue)
    {
         PropertySetExtensions.AddSingle(surfaceCreationProperties, Egl.EGLRenderResolutionScaleProperty, resolutionScale.Value);
    }

seem to fail. What may be causing this in Microsoft Store certification? Does anybody know any workarounds for this?

Code

https://github.com/hyvanmielenpelit/GnollHack

Expected Behavior

Microsoft Store certification does not result in exceptions.

Actual Behavior

Microsoft Store certification throws System.Runtime.InteropServices.COMException: Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))

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

Windows 10.0.22631.3296

Devices

Dell Latitude 5520, during Microsoft Store certification process

Relevant Screenshots

No response

Relevant Log Output

No response

Code of Conduct

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

This seemed to be now fixed by Microsoft Store adjusting their setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant