HRESULT: 0x88980406 on ShowDialog

1

Good Afternoon, At my company, we have an application (portal) which opens up my application form in a new dialog. I can open up items upto 15 times before I get the following exception on 16th item (every time)

form.ShowDialog();

Here are the exception details.

System.Runtime.InteropServices.COMException was caught Message=Exception from HRESULT: 0x88980406 Source=PresentationCore ErrorCode=-2003303418 StackTrace: at System.Windows.Media.Composition.DUCE.Channel.SyncFlush() at System.Windows.Media.MediaContext.CompleteRender() at System.Windows.Interop.HwndTarget.OnResize() at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow) at System.Windows.Window.ShowHelper(Object booleanBox) at System.Windows.Window.Show() at System.Windows.Window.ShowDialog() at MyProject.App.Main() in c:\Projects\MyProject\App.xaml.cs:line xxx InnerException:

Other notes: If I add the following line after showdialog()

Dispatcher.CurrentDispatcher.InvokeShutdown();

Then after I close lets say 2 items, I can open 2 more, but it can never exceed more then 15 dialogs at any given point.

Here are details from task mngr when I have upto 15 items open. Memory: Around 280k Threads: 54 Handles 2,248, User Objects: 700ish GDI objects: 372.

After googling around, some similar problems were about having transparency or outdated drivers, I have also set transparency as false and updated all drivers. Some also suggested to update to latest .net framework (4.5) but I cant change that at this point from 3.5.

In my forms, I do have an imagectrl as well as a webbrowser, but I dispose them on close.

Any help would be appreciated.

c#
wpf
xaml
.net-3.5
asked on Stack Overflow Aug 27, 2014 by sylar

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0