This may not be enough to go on but thought I might try anyway - a user of ours is getting a null reference exception with the dock manager after she closes a form in our app. The call stack doesn't have any of our code methods, it's all Infragistics. So far I have been unable to reproduce the issue. I have more info in an error report (screenshot, computer info etc.), should it be needed but I'd have to scrub it first. I don't have a sample app to reproduce the issue. Any ideas? Maybe a known issue?
Normal 0 false false false EN-US X-NONE X-NONE
Time of Error: 1/19/2012 8:40:10 AM
Exception outermost view of call stack
--------------------------------------------------------------------------------
Exception type: System.NullReferenceException
Source: Infragistics2.Win.UltraWinDock.v10.2
Source Assembly: Infragistics2.Win.UltraWinDock.v10.2.DLL
Source Assembly Version: 10.2.20102.2109
Source Type: Infragistics.Win.UltraWinDock.UltraDockManager
Source Method: Void FireEvent(Infragistics.Win.UltraWinDock.DockManagerEventIds, System.EventArgs)
Debug Build?: True
Message: Object reference not set to an instance of an object.
Stack Trace:
at Infragistics.Win.UltraWinDock.UltraDockManager.FireEvent(DockManagerEventIds id, EventArgs e)
at Infragistics.Win.UltraWinDock.UltraDockManager.NotifyPossibleActivePaneChange()
at Infragistics.Win.UltraWinDock.UltraDockManager.ActivatePane(DockableControlPane pane, Boolean force)
at Infragistics.Win.UltraWinDock.DockableControlPane.Activate()
at Infragistics.Win.UltraWinDock.PaneCaptionButtonUIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.UIElement.OnMouseDown(MouseEventArgs e, Boolean adjustableArea, UIElement& captureMouseForElement)
at Infragistics.Win.ControlUIElementBase.ProcessMouseDownHelper(Object sender, MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseDown(Object sender, MouseEventArgs e)
at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
at Infragistics.Win.UltraWinDock.DockControlBase.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I have the exact same problem using Infragistics2.Win.UltraWinDoc.v10.3 (10.3.20103.1000). In my case I'm seeing it with about 2 users out of about 2000.
The lack of a stack trace is due to how the exception is being handled in the FireEvent method. Using Reflector I can see code like the following in that method:
catch (Exception ex){ throw ex;}
Re-throwing an exception using "throw ex" instead of just "throw" destroys the stack trace and is a big no-no (I'm looking at you Infragistics team).
I'm hoping I could persuade you to make the code change and release a patch. I'm fairly certain that with the entire stack trace we would be able to diagnose the problems we're having.
What do you say? Service release?
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue?
Thank you for using Infragistics Components.
Hello ,
If you are able to isolate the issue in a small sample, in order to be able to reproduce it on my machine, then I will be able to investigate this further for you.
I am waiting for your feedback.
I think maybe you might be misunderstanding what we are doing. Initially we simply load a default layout XML file that we manually save once when things are laid out as desired. Later the user can make changes to the docking layout and before exiting the app we save that layout. The next time the user runs the app we load that layout file again. After the layout is loaded succesfully we set a few properties in code to make sure there are a few things that are consistent (or perhaps setting dynamic data that has changed since the xml file was saved).
Sometimes however when the dock manager serializes its layout, it does so in such a way that it has trouble deserializing it when it is next loaded. If and only if an exception was generated through loading the layout, then we simply delete the user's "corrupt" layout XML file and replace it with our original default layout XML file that we know works.
From the point it is saved to the point it is loaded, we are not doing anything in our code - it's just Infra Save and Load. When the data occasionally gets corrupt it is in that window.
Normal 0 false false false EN-US ZH-TW AR-SA
Hello,
When you load UltraDockManager’s layout, it is not very good approach to delete docking layouts and to make changes into the layout trough the code, because you could miss to remove a pane from the panes collection in the docked areas. You said that you had sporadic startup errors so I think that the changes made into the UltraDockManager’s layout, causing your issue so when you reset the UltraDockManager’s layout you do not get exceptions during the saving of the UltraDockManager’s layout.
Please let me know if you have any further questions.