Win32 Application .exe closes with (Access Violation) in UIAutomationCore.dll only with windows11, windows server 2022, windows10 21H2

Kumar Nagaraj 6 Reputation points

On Windows 11, windows server 2022 and windows10 21H2 it is getting an Access Violation in UIAutomationCore.dll when it is closed. The application code does not use Microsoft's Automation framework or make calls to the UIAutomationCore.dll.

We would like Microsoft technical support to help diagnose and determine what can be done to find a solution. Again the application code does not use Microsoft Automation API or make any calls to UIAutomationCore.dll. We can look at loaded DLLs and see that it is loaded in the application process but the application did not load it. It is probably being loaded by some Windows UI dll.


Application: app.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
at MS.Internal.Automation.UiaCoreApi.RawUiaHPatternObjectFromVariant(System.Object ByRef, MS.Internal.Automation.SafePatternHandle ByRef)
at MS.Internal.Automation.UiaCoreApi.UiaHPatternObjectFromVariant(System.Object)
at MS.Internal.Automation.UiaCoreApi+UiaCacheResponse.ConvertFromComTypesToClrTypes(System.Object[,], UiaCacheRequest)
at MS.Internal.Automation.UiaCoreApi.UiaGetUpdatedCache(MS.Internal.Automation.SafeNodeHandle, UiaCacheRequest, NormalizeState, System.Windows.Automation.Condition)
at System.Windows.Automation.AutomationElement.GetUpdatedCache(System.Windows.Automation.CacheRequest)

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,473 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,616 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Dave Patrick 426.3K Reputation points MVP

    We would like Microsoft technical support to help diagnose and determine what can be done to find a solution

    For this you'll need to open a support case with product support.

    --please don't forget to upvote and Accept as answer if the reply is helpful--