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.
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+UiaCacheResponse.ConvertFromComTypesToClrTypes(System.Object[,], UiaCacheRequest)
at MS.Internal.Automation.UiaCoreApi.UiaGetUpdatedCache(MS.Internal.Automation.SafeNodeHandle, UiaCacheRequest, NormalizeState, System.Windows.Automation.Condition)