Strange error when docking back a toolwindow

Docking/MDI for WPF Forum

Posted 14 years ago by Radu
Version: 10.1.0522
Avatar
Hi

On one laptop we experience a very strange behavior... it happens when we try to dock back a specific toolwindow by dropping it over any of the docking "icons". If we do it using the "Dock" option in the menu it works fine, no problems.

The error thrown is:

Exception from HRESULT: 0x88980406

System.Runtime.InteropServices.COMException (0x88980406): Exception from HRESULT: 0x88980406 at System.Windows.Media.Composition.DUCE.Channel.SyncFlush() at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet) at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam) at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage 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, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Source: Presentation.Core

at System.Windows.Media.Composition.DUCE.Channel.SyncFlush() at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet) at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam) at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage 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, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
It is a Win7 Terra laptop with .NET 4 installed (Actipro 10.1.522)

Do you have any idea why is this happening?

Comments (5)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Radu,

I don't believe we've heard of that happening before and we don't use COM. Further, none of our code is listed in your stack trace. Perhaps there is an issue with some COM control you are using as child content, that doesn't like to be reparented in some scenario?

If you think it is a problem with our code (but again this seems external to anything we can control), then please put together a simple sample project that shows the issue and email it over. Please don't include any .exe files in the ZIP you send. Thanks.


Actipro Software Support

Posted 14 years ago by Radu
Avatar
Thank you for your reply. I'll try to investigate more and also ask the authors of the component that is hosted inside that ToolWindow.
Posted 14 years ago by Radu
Avatar
I am back with more information. We could easily reproduce the problem on one of our development machines.

 AMADEE.Wpf.Designer.exe!AMADEE.Wpf.Designer.App.UnhandledExceptionEventHandler(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) Line 345      C#

               WindowsBase.dll!System.Windows.Threading.Dispatcher.CatchException(System.Exception e) + 0x4f bytes 

               WindowsBase.dll!System.Windows.Threading.Dispatcher.CatchExceptionStatic(object source, System.Exception e) + 0x3d bytes      

               WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.CatchException(object source, System.Exception e, System.Delegate catchHandler) + 0x6b bytes              

               WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x93 bytes            

                WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) + 0xb4 bytes              

               WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x104 bytes     

               [Native to Managed Transition]               

               [Managed to Native Transition]               

               WindowsBase.dll!MS.Win32.HwndSubclass.DefWndProcWrapper(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x50 bytes    

               [Native to Managed Transition]               

               [Managed to Native Transition]               

               WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x140 bytes     

               [Native to Managed Transition]               

               [Managed to Native Transition]               

               PresentationFramework.dll!System.Windows.Window.InternalClose(bool shutdown, bool ignoreCancel) + 0xa1 bytes    

               PresentationFramework.dll!System.Windows.Window.Close() + 0x2a bytes    

                ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.Primitives.RaftingWindow.Close(ActiproSoftware.Windows.Controls.Docking.DockingWindowCloseReason closeReason) + 0x38 bytes         

                ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.a(ActiproSoftware.Windows.Controls.Docking.RaftingHost A_0) + 0x94 bytes           

                ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.OnDockHostLayoutChanged(object A_0, System.Windows.RoutedEventArgs A_1) + 0x86 bytes      

               PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x7a bytes     

               PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) + 0x1ae bytes              

               PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) + 0x79 bytes                

               PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs e) + 0x29 bytes                

               ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.EventNotifier.a() + 0x114 bytes                

                ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.DockSite.a(System.Windows.DependencyObject A_0, ActiproSoftware.Windows.Controls.Docking.IDockTarget A_1, ActiproSoftware.Windows.Controls.Docking.Direction A_2) + 0x1bb bytes        

                ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.Primitives.RaftableDockingWindowContainer.OnPreviewWindowExitMove(object A_0, ActiproSoftware.Windows.Controls.Docking.Preview.DockingPreviewEventArgs A_1) + 0x115 bytes        

                ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.Preview.PreviewWindow.StopPreview(ActiproSoftware.Windows.Controls.Docking.Preview.DockingPreviewEventArgs A_0) + 0x1a2 bytes         

                ActiproSoftware.Docking.Wpf351.dll!ActiproSoftware.Windows.Controls.Docking.Preview.PreviewWindow.OnMouseUp(object A_0, System.Windows.Input.MouseButtonEventArgs A_1) + 0x40 bytes           

               PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget) + 0x31 bytes      

               PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) + 0x36 bytes      

               PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x40 bytes     

               PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) + 0x1ae bytes              

               PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) + 0x79 bytes                

               PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args) + 0x41 bytes          

               PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs args, bool trusted) + 0x42 bytes    

               PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea() + 0x1ff bytes          

               PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input) + 0x45 bytes        

               PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport) + 0x62 bytes          

               PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawMouseActions actions, int x, int y, int wheel) + 0x263 bytes             

               PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x4ac bytes                

               PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x75 bytes  

               WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0xbe bytes  

               WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x7d bytes          

               WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x53 bytes 

               WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x42 bytes            

                WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) + 0xb4 bytes              

               WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x104 bytes     

               [Native to Managed Transition]               

               [Managed to Native Transition]               

                WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) + 0xc1 bytes       

                WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x49 bytes       

               WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() + 0x4c bytes  

               PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) + 0x17 bytes               

               PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x6f bytes    

               PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x26 bytes                

               PresentationFramework.dll!System.Windows.Application.Run() + 0x1b bytes 

               AMADEE.Wpf.Designer.exe!AMADEE.Wpf.Designer.App.Main() + 0x5e bytes                C#

               [Native to Managed Transition]               

               [Managed to Native Transition]               

               mscorlib.dll!System.AppDomain.nExecuteAssembly(System.Reflection.RuntimeAssembly assembly, string[] args) + 0x9 bytes            

               mscorlib.dll!System.Runtime.Hosting.ManifestRunner.Run(bool checkAptModel) + 0x6e bytes            

               mscorlib.dll!System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() + 0x90 bytes      

               mscorlib.dll!System.Runtime.Hosting.ApplicationActivator.CreateInstance(System.ActivationContext activationContext, string[] activationCustomData) + 0x65 bytes              

               mscorlib.dll!System.Runtime.Hosting.ApplicationActivator.CreateInstance(System.ActivationContext activationContext) + 0xd bytes 

               mscorlib.dll!System.Activator.CreateInstance(System.ActivationContext activationContext) + 0x44 bytes        

                Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() + 0x23 bytes      

               mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x63 bytes               

               mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes    

               mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes               

               mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes           

               [Native to Managed Transition]               

Please check the above stack trace maybe you find something. It is quite critical for us as it bombs not only on some specific ToolWindow, we can reproduce it with at least 2 different ones (with various content each)

Thanks in advance!
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Radu,

From your stack trace, all we are doing is closing the "rafting" window, which is a WPF Window that hosts floating docking windows, and that standard Close call is making some exception occur deep in Microsoft code.

We've not seen that exception before and again, are not sure it's something that we are doing. It seems more like something in the content of the docking windows would cause it. But we can't tell you for sure unless you provide a simple sample project that can repro it, as mentioned in our last reply.


Actipro Software Support

Posted 14 years ago by Radu
Avatar
It seems that installing the latest Actipro version (523) fixed this critical bug!!!


PS: Now we got some other small problem in some different scenario (but that one is rare and difficult to reproduce; I will make a different topic when I have a reproductible pattern).

[Modified at 07/05/2010 04:59 AM]
The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.