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

Avalonia app crashes on exit (.net framework only) #7579

Closed
ltetak opened this issue Feb 10, 2022 · 0 comments · Fixed by #7887
Closed

Avalonia app crashes on exit (.net framework only) #7579

ltetak opened this issue Feb 10, 2022 · 0 comments · Fixed by #7887
Labels

Comments

@ltetak
Copy link
Contributor

ltetak commented Feb 10, 2022

Describe the bug
.net framework Avalonia app crashes on exit. The crash is not visible unless debugging but it is present also in Event Viewer -> Application logs.
This does not repro for .net core apps.

To Reproduce
Start any Avalonia app. e.g. the sample ControlCatalog.Desktop (not the ControlCatalog.NetCore). On exit, the application crashes in SkiaSharp deinitialization.

Desktop (please complete the following information):

  • OS: Windows 10 21H1
  • Version 0.10.12

Additional context
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

   at SkiaSharp.Internals.PlatformLock.NonAlertableWin32Lock.EnterCriticalSection(IntPtr lpCriticalSection)
   at SkiaSharp.Internals.PlatformLock.NonAlertableWin32Lock.Enter()
   at SkiaSharp.Internals.PlatformLock.NonAlertableWin32Lock.EnterWriteLock()
   at SkiaSharp.HandleDictionary.DeregisterHandle(IntPtr handle, SKObject instance)
   at SkiaSharp.SKObject.DeregisterHandle(IntPtr handle, SKObject instance)
   at SkiaSharp.SKObject.set_Handle(IntPtr value)
   at SkiaSharp.SKNativeObject.Dispose(Boolean disposing)
   at SkiaSharp.SKObject.Dispose(Boolean disposing)
   at SkiaSharp.SKNativeObject.Finalize()

SKObject instance is either SKFont or GRContext

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

Successfully merging a pull request may close this issue.

1 participant