Crash when running on Windows 11 on ARM
See original GitHub issueDescribe the bug
An unhandled exception of type ‘System.AccessViolationException’ occurred in Avalonia.Win32.dll Attempted to read or write protected memory. This is often an indication that other memory is corrupt
To Reproduce
Run new Avalonia app from template on Windows 11 on ARM
Expected behavior
No crash
Screenshots
Desktop (please complete the following information):
- OS: Windows 11 on ARM
- Version 0.10.x
Additional context
Running inside VM MacOS M1 Parallels
Disabling WindowsUIComposition avoids crash.
new Win32PlatformOptions() { UseWindowsUIComposition = false }
https://github.com/dotnet/runtime/issues/72321
[External Code]
> dcomp.dll!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::IAsyncActionCompletedHandler::*)(Windows::Foundation::IAsyncAction *,enum ABI::Windows::Foundation::AsyncStatus)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::IAsyncActionCompletedHandler,Microsoft::WRL::FtmBase>,<lambda_2a41ea20f21462c29868894764bbafd5>,-1,Windows::Foundation::IAsyncAction *,enum ABI::Windows::Foundation::AsyncStatus>::Invoke() Unknown
dcomp.dll!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_235ffb6b1ffc6a4928642e92ab1f25a5>,Windows::Foundation::IAsyncActionCompletedHandler>() Unknown
dcomp.dll!<lambda>(void)() Unknown
dcomp.dll!Microsoft::WRL2::ContextSession::LeaveSession_Callback<<lambda>(void)>() Unknown
dcomp.dll!Windows::UI::Composition::CompositorCommon::OnCommitCompletion(void) Unknown
CoreMessaging.dll!CFlat::SehSafe::Execute<<lambda_19cca5ef35227df66cdfebe4b6644b4b>>() Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::WaitCallback::ImportAdapter$() Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::RegisteredWait::DoCallback() Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::DeferredCall::Callback_Dispatch() Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::DeferredCallDispatcher::Callback_OnDispatch() Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop() Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue(enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *) Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch(bool,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *) Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw(enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,bool,void * *) Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork(struct HWND__ *,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,bool) Unknown
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64) Unknown
user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,__int64 (*)(struct tagWND *,unsigned int,unsigned int64,__int64),struct HWND *,enum _WM_VALUE,unsigned __int64,__int64,void *,int) Unknown
user32.dll!DispatchClientMessage() Unknown
user32.dll!__fnDWORD () Unknown
ntdll.dll!KiUserCallbackDispatcherReturn () Unknown
win32u.dll!NtUserGetMessage () Unknown
user32.dll!GetMessageW() Unknown
[External Code]
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
[Managed to Native Transition]
Avalonia.Win32.dll!Avalonia.Win32.WinRT.Impl.__MicroComICompositionGraphicsDeviceProxy.CreateDrawingSurface(Avalonia.Win32.Interop.UnmanagedMethods.SIZE sizePixels, Avalonia.Win32.WinRT.DirectXPixelFormat pixelFormat, Avalonia.Win32.WinRT.DirectXAlphaMode alphaMode)
Avalonia.Win32.dll!Avalonia.Win32.WinRT.Composition.WinUICompositorConnection.CreateWindow(nint hWnd)
Avalonia.Win32.dll!Avalonia.Win32.WinRT.Composition.WinUiCompositedWindowSurface.CreateGlRenderTarget()
Avalonia.Skia.dll!Avalonia.Skia.GlRenderTarget.GlRenderTarget(SkiaSharp.GRContext grContext, Avalonia.OpenGL.Surfaces.IGlPlatformSurface glSurface)
Avalonia.Skia.dll!Avalonia.Skia.GlSkiaGpu.TryCreateRenderTarget(System.Collections.Generic.IEnumerable<object> surfaces)
Avalonia.Skia.dll!Avalonia.Skia.PlatformRenderInterface.CreateRenderTarget(System.Collections.Generic.IEnumerable<object> surfaces)
Avalonia.Controls.dll!Avalonia.Controls.TopLevel.CreateRenderTarget()
Avalonia.Controls.dll!Avalonia.Controls.TopLevel.Avalonia.Rendering.IRenderRoot.CreateRenderTarget()
Avalonia.Base.dll!Avalonia.Rendering.Composition.Server.ServerCompositionTarget.Render()
Avalonia.Base.dll!Avalonia.Rendering.Composition.Server.ServerCompositor.RenderCore()
Avalonia.Base.dll!Avalonia.Rendering.Composition.Server.ServerCompositor.Render()
Avalonia.Base.dll!Avalonia.Rendering.RenderLoop.TimerTick(System.TimeSpan time)
Avalonia.Win32.dll!Avalonia.Win32.WinRT.Composition.WinUICompositorConnection.RunLoopHandler.Invoke(Avalonia.Win32.WinRT.IAsyncAction asyncInfo, Avalonia.Win32.WinRT.AsyncStatus asyncStatus)
Avalonia.Win32.dll!Avalonia.Win32.WinRT.Impl.__MicroComIAsyncActionCompletedHandlerVTable.Invoke(void* this, void* asyncInfo, Avalonia.Win32.WinRT.AsyncStatus asyncStatus)
[Native to Managed Transition]
dcomp.dll!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::IAsyncActionCompletedHandler::*)(Windows::Foundation::IAsyncAction *,enum ABI::Windows::Foundation::AsyncStatus)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::IAsyncActionCompletedHandler,Microsoft::WRL::FtmBase>,<lambda_2a41ea20f21462c29868894764bbafd5>,-1,Windows::Foundation::IAsyncAction *,enum ABI::Windows::Foundation::AsyncStatus>::Invoke()
dcomp.dll!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_235ffb6b1ffc6a4928642e92ab1f25a5>,Windows::Foundation::IAsyncActionCompletedHandler>()
dcomp.dll!<lambda>(void)()
dcomp.dll!Microsoft::WRL2::ContextSession::LeaveSession_Callback<<lambda>(void)>()
dcomp.dll!Windows::UI::Composition::CompositorCommon::OnCommitCompletion(void)
CoreMessaging.dll!CFlat::SehSafe::Execute<<lambda_19cca5ef35227df66cdfebe4b6644b4b>>()
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::WaitCallback::ImportAdapter$()
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::RegisteredWait::DoCallback()
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::DeferredCall::Callback_Dispatch()
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::DeferredCallDispatcher::Callback_OnDispatch()
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop()
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue(enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *)
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch(bool,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *)
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw(enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,bool,void * *)
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork(struct HWND__ *,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,bool)
CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)
user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,__int64 (*)(struct tagWND *,unsigned int,unsigned int64,__int64),struct HWND *,enum _WM_VALUE,unsigned __int64,__int64,void *,int)
user32.dll!DispatchClientMessage()
user32.dll!__fnDWORD ()
ntdll.dll!KiUserCallbackDispatcherReturn ()
win32u.dll!NtUserGetMessage ()
user32.dll!GetMessageW()
[Managed to Native Transition]
Avalonia.Win32.dll!Avalonia.Win32.WinRT.Composition.WinUICompositorConnection.RunLoop()
Avalonia.Win32.dll!Avalonia.Win32.WinRT.Composition.WinUICompositorConnection.TryCreateAndRegisterCore.AnonymousMethod__0()
[Native to Managed Transition]
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:16 (9 by maintainers)
Top Results From Across the Web
Teams Crash on Windows 11 ARM64
Was able to deploy Windows 11 ARM64 and install Teams without issue. I've performed chkdsk /f /r with no success on failing VM....
Read more >Program Compatibility Troubleshooter on Arm
On ARM, a section titled Windows 10 on ARM or Windows 11 on ARM will be available in the Compatibility tab. Click Change...
Read more >Windows 11 Keeps Crashing? Try These Methods
Windows 11 Keeps Crashing? Try These Methods · 1. Check for System Updates · 2. Update Your Device Drivers · 3. Remove Recently...
Read more >Windows 11 ARM - Visual studio IIS Express crash
My app builds, but trying to view it locally in the browser results in a 503 and the app pool crashes with the...
Read more >Crash on new game start(Windows 11 on ARM) :: Kenshi ...
I'm using new macbook on m1 and trying to get this game working in parallels Win11 on ARM. Main menu is working fine,...
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 FreeTop 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
Top GitHub Comments
@Lakritzator my apologies, I pinged a wrong person.
@olifink thank you testing these changes. If you will find anything else, please let me know.
Try disabling GPU rendering and other thing to try Direct2D1 backend