Hi,
I was moving a floating window when the below exception occured.
Our application uses multiple top-level windows in different appdomains, and a ribbon with office 2010 style backstage.
Infragistics version is currently 2013.1.
Any insights? Anything we can do to prevent it, since the affected window sometimes hangs afterward and the application must be manually terminated.
App_DispatcherUnhandledExceptionSystem.InvalidOperationException: Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed. at System.Windows.Window.CoerceVisibility(DependencyObject d, Object value) at System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, Object controlValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, Boolean skipBaseValueChecks) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at System.Windows.Data.BindingOperations.SetBinding(DependencyObject target, DependencyProperty dp, BindingBase binding) at Infragistics.Windows.Controls.ToolWindowHostWindow.DeferShowHelper.Show(Boolean activate) at Infragistics.Windows.Controls.ToolWindow.DeferredShowInfo.ProcessShow(Boolean cancel) at Infragistics.Windows.DockManager.DockManagerUtilities.ShowToolWindow(ToolWindow window, FrameworkElement owner, Boolean activate) at Infragistics.Windows.DockManager.Dragging.DragManager.CreateFloatingPreviewWindow(Point point, Size size) at Infragistics.Windows.DockManager.Dragging.MoveWindowAction.PerformAction(DragManager dragManager, Boolean isPreview) at Infragistics.Windows.DockManager.Dragging.DragManager.ProcessDragMove(IInputDeviceInfo e, Nullable`1 windowRect) at Infragistics.Windows.DockManager.Dragging.DragManager.StartDrag(FrameworkElement element, Point mouseDownPosition, IInputDeviceInfo e, Boolean processMove, Boolean isWindowDragMode) at Infragistics.Windows.DockManager.Dragging.DragManager.OnPendingDragElementMouseMove(Object sender, MouseEventArgs e) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(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)
We are currently locked to version 13.1.20131.2204. What is the latest hotfix version for 13.1?
With regards to the latest version, have you tried using the last hotfix for 13.1?
I'm trying to reproduce the issue in a test app using the OCX in the pane but so far I haven't been able to get it to happen in the test app. Because we have a dependency that is referencing a specific version of the infragistics controls I can't test with the latest version in our production application.
That could well be contributing to the issue. Can you try and create a sample that has a similar element tree/setup to your app and see if you can reproduce the issue there?
I don't think that is showing the issue. The other callstack you had was resulting in an exception during the show of the preview window but this looks like the normal callstack for when the preview is closed (there is no show further up the callstack). If it were the cause then the create/show of the floating pane would have been in the callstack. It is expected that there will be multiple toolwindows shown and closed during a drag operation as the preview window, drop indicators and floating window itself are all hosted within toolwindows. I think what you are looking for is a window whose Close is being triggered during the show of the hosting window. I would still recommend trying with the latest version (start with the latest hotfix for 13.1 first and if it still happens with the latest NA version).