[Accessibility] Race condition with other UIAutomation instances?

Stefan Krause stepkraus1 at gmail.com
Wed Nov 25 00:19:18 CET 2020

Hi there,

I have a somewhat general question regarding the usage of Microsoft's
UIAutomation framework in Qt apps.

The story is, I have developed a QWidget-based desktop application that
relies on an own instance of UIAutomation (the app analyzes user interfaces
of other applications running on Windows). This has worked great so far
while I did not update Qt and instead used Qt 5.6 for years (a version long
before UIAutomation got introduced to Qt). I have recently updated Qt to
5.15.0. Since then my app unfortunately crashes occasionally with an access
violation in QtCore.dll. Further below in the call stack I can see that
UIAutomation is involved. It could be a race condition.

My question is, could it be that one is not allowed anymore to work with an
own instance of UIAutomation since Qt 5.11 and higher? I'm suspecting this
because I saw the identical crash/call stack when I accidentally worked
with separate instances of UIAutomation in separate threads within my

Is there maybe a way to turn off QAccessibility entirely?

Any clarification (or at least a hint) would be greatly appreciated!

Also, please let me know in case this is the place for this kind of

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/accessibility/attachments/20201125/ab22dab2/attachment.html>

More information about the Accessibility mailing list