錯誤信息:app
沒有足夠的內存繼續執行程序 在 System.Windows.Media.Composition.DUCE.Channel.SyncFlush() 在 System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet) 在 System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam) 在 System.Windows.Interop.HwndTarget.OnWindowPosChanging(IntPtr lParam) 在 System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage 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(Object o) 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
咱們認爲這個問題也可能與硬件有關,而且它可能不會出如今不一樣的視頻卡的機器上。this
經過禁用硬件加速來檢查它,並在應用程序中的主窗體的加載事件處理程序中放置如下代碼:spa
var hwnd_source = (System.Windows.Interop.HwndSource)PresentationSource.FromVisual(this); var hwnd_target = hwnd_source.CompositionTarget; hwnd_target.RenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;
禁用後,不會出現問題了,多是硬件問題!code
有待解決...................視頻