Wpf System.Runtime.InteropServices.COMException(0x88980406)

Wpf System.Runtime.InteropServices.COMException(0x88980406),wpf,Wpf,我们有一个连接到显微镜的WPF应用程序。 有一种情况是,在应用程序中,我们可以切换显微镜的物镜,当我们切换物镜时,会有一个硬件调用,告诉显微镜更改镜头,然后更新UI 我们对这个场景进行了压力测试,最终得到了一个 System.Runtime.InteropServices.COMException (0x88980406) 源代码为PresentationCore.dll 调用堆栈是: Message=来自HRESULT的异常:0x88980406;类别:关键;优先次序:-1;事件编号:1;

我们有一个连接到显微镜的WPF应用程序。 有一种情况是,在应用程序中,我们可以切换显微镜的物镜,当我们切换物镜时,会有一个硬件调用,告诉显微镜更改镜头,然后更新UI

我们对这个场景进行了压力测试,最终得到了一个

System.Runtime.InteropServices.COMException (0x88980406)
源代码为
PresentationCore.dll

调用堆栈是:

Message=来自HRESULT的异常:0x88980406;类别:关键;优先次序:-1;事件编号:1;
时间戳:2011年4月13日星期三下午6:35:46;消息:全文=System.Runtime.InteropServices.COMException(0x88980406):来自HRESULT的异常:0x88980406
在System.Windows.Media.Composition.DUCE.Channel.SyncFlush()中
在System.Windows.Media.Composition.DUCE.CompositionTarget.UpdateWindowSettings(ResourceHandle hCompositionTarget、RECT windowRect、Color-colorKey、Single constantAlpha、MILWindowLayerType windowLayerType、MILTransparencyFlags transparencyMode、Boolean isChild、Boolean isRTL、Boolean renderingEnabled、Int32 disableCookie、Channel)
在System.Windows.Interop.HwndTarget.UpdateWindowSettings(布尔enableRenderTarget,Nullable``1通道集)
位于System.Windows.Interop.HwndTarget.UpdateWindowSettings(布尔启用RenderTarget)
在System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)中
位于System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg、IntPtr wparam、IntPtr lparam)
在System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr-hwnd、Int32-msg、IntPtr-wParam、IntPtr-lParam、Boolean和handled)
在MS.Win32.HwndWrapper.WndProc(IntPtr-hwnd、Int32-msg、IntPtr-wParam、IntPtr-lParam、Boolean和handled)
在MS.Win32.HwndSubclass.DispatcherCallbackOperation(对象o)上
位于System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调、对象参数、布尔isSingleParameter)
位于System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象源、委托回调、对象参数、布尔isSingleParameter、委托catchHandler)
位于System.Windows.Threading.Dispatcher.WrappedInvoke(委托回调、对象参数、布尔isSingleParameter、委托catchHandler)
位于System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority优先级、TimeSpan超时、委托方法、对象参数、布尔isSingleParameter)
位于System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority优先级、委托方法、对象参数)
位于MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd、Int32 msg、IntPtr wParam、IntPtr lParam)
位于MS.Win32.unsafentiveMethods.SetWindowPos(HandleRef hWnd、HandleRef HwnInsertafter、Int32 x、Int32 y、Int32 cx、Int32 cy、Int32标志)
位于System.Windows.Interop.HwndSource.Resize(大小新闻大小)
位于System.Windows.Interop.HwndSource.OnLayoutUpdated(对象对象obj、事件args args)
位于System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()处
位于System.Windows.ContextLayoutManager.UpdateLayout()处
位于System.Windows.UIElement.UpdateLayout()处
位于System.Windows.Interop.HwndSource.SetLayoutSize()处
在System.Windows.Interop.HwndSource.set_RootVisualInternal(可视值)中
位于System.Windows.Interop.HwndSource.set_RootVisual(可视值)
在System.Windows.Controls.Primitives.Popup.PopupSecurityHelper.SetWindowRootVisual(Visual v)中
在System.Windows.Controls.Primitives.Popup.SetRootVisualTopoppupRoot()中
位于System.Windows.Controls.Primitives.Popup.CreateWindow(布尔异步调用)
在System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(DependencyObject d,DependencyPropertyChangedEventArgs e)
位于System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs参数)
在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex EntryIndex,DependencyProperty dp,PropertyMetadata,EffectiveValueEntry oldEntry,EffectiveValueEntry&newEntry,布尔强制带延迟引用,OperationType OperationType)
位于System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp、对象值、PropertyMetadata元数据、布尔强制WithDeferredReference、OperationType OperationType、Boolean isInternal)
位于System.Windows.DependencyObject.SetValue(DependencyProperty dp,对象值)
位于System.Windows.Data.BindingOperations.SetBinding(DependencyObject目标、DependencyProperty dp、BindingBase绑定)
位于System.Windows.Controls.Primitives.Popup.CreateRootPopup(Popup Popup,UIElement子元素)
在System.Windows.Controls.ToolTip.hookupparentpoup()中
在System.Windows.Controls.ToolTip.OnIsOpenChanged(DependencyObject d,DependencyPropertyChangedEventArgs e)
位于System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs参数)
在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex EntryIndex,DependencyProperty dp,PropertyMetadata,EffectiveValueEntry oldEntry,EffectiveValueEntry&newEntry,布尔强制带延迟引用,OperationType OperationType)
位于System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp、对象值、PropertyMetadata元数据、布尔强制WithDeferredReference、OperationType OperationType、Boolean isInternal)
位于System.Windows.DependencyObject.SetValue(DependencyProperty dp,对象值)
位于System.Windows.DependencyObject.SetValue(DependencyProperty dp,布尔值)
在System.Windows.Controls.PopupControlService.RaiseTooltIPOpenEvent()中
位于System.Windows.Controls.PopupControlService.OnRaiseToolTipOpenEvent(对象发送方,事件参数e)
位于System.Windows.Threading.Dispatchermer.FireTick(未使用的对象)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调、对象参数、布尔isSinglePa
HwndTarget hwndTarget = source.CompositionTarget;
hwndTarget.RenderMode = RenderMode.SoftwareOnly;