Fullscreen WPF app crashes when connected via TeamViewer

点点圈 提交于 2019-12-23 12:28:01

问题


I've created a WPF app which works pretty stable. But there is one issue I'm not able to solve.

When I connect via TeamViewer (version 11) to the tablet on which my WPF app is running (in fullscreen mode), the app crashes. Same happens when I end the remote connection.

I got following exception:

System.ComponentModel.Win32Exception (0x80004005): Cannot create a file when that file already exists
at MS.Win32.UnsafeNativeMethods.GetWindowText(HandleRef hWnd, StringBuilder lpString, Int32 nMaxCount)
at System.Windows.Automation.Peers.WindowAutomationPeer.GetNameCore()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.ContextLayoutManager.fireAutomationEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I assume that the problem is somewhere in my code and is not a fault of TeamViewer. I was already searching for the GetWindowText() method without success. The only thread here on StackOverFlow which refers to the same exception couldn't help me either.

Hopefully someone can give me some reasons why this exception could occur.

来源:https://stackoverflow.com/questions/39975982/fullscreen-wpf-app-crashes-when-connected-via-teamviewer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!