[0.9.3] [Mac OS] SharpGen.Runtime.SharpGenException
See original GitHub issueAvaloniaUI 0.93
OS is running under virtual machine:
macOS 10.13.6 (17G66)
Darwin 17.7.0
Got the following error when executing an application:
Unhandled exception. SharpGen.Runtime.SharpGenException: HRESULT: [0x80004005], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: Unknown
at SharpGen.Runtime.Result.CheckError()
at Avalonia.Native.Interop.IAvnGlDisplay.CreateContext(IAvnGlContext share)
at Avalonia.Native.GlPlatformFeature..ctor(IAvnGlDisplay display)
at Avalonia.Native.AvaloniaNativePlatform.DoInitialize(AvaloniaNativePlatformOptions options)
at Avalonia.Native.AvaloniaNativePlatform.Initialize(IntPtr factory, AvaloniaNativePlatformOptions options)
at Avalonia.Native.AvaloniaNativePlatform.Initialize(AvaloniaNativePlatformOptions options)
at Avalonia.AvaloniaNativePlatformExtensions.<>c__DisplayClass0_0`1.<UseAvaloniaNative>b__0()
at Avalonia.Controls.AppBuilderBase`1.Setup()
at Avalonia.Controls.AppBuilderBase`1.SetupWithLifetime(IApplicationLifetime lifetime)
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode)
at PanelCreator.App.Program.Main(String[] args)
Abort trap: 6
Probably related to a commit 643217452896a0bfd1d037ce6af4fa3ffaa36b9c
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
About the security content of macOS Monterey 12.6.3
This document describes the security content of macOS Monterey 12.6.3.
Read more >Install .NET on macOS
In this article, you'll learn how to install .NET on macOS. .NET is made up of the runtime and the SDK. The runtime...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

OSX doesn’t properly support OpenGL when running in virtual machines. We’ve been trying to use it anyway which caused various visual artifacts. You can disable OpenGL acceleration by adding
.With(new AvaloniaNativePlatformOptions { UseGpu = false })to your AppBuilder.There is another unhandled system exception. It appears after application was closed (ShutdownMode.OnMainWindowClose is used). MacOS error.txt
Here is a console output