You'll probably need to ask the TeamViewer developers to investigate if/why their DLL is causing cross-thread (or possibly cross-process) communication on UI threads, since that can lead to the threads deadlocking.
Their DLL is being injected into our callstack, rather than something we're talking to on purpose, and we don't really have any way to know what it does.