Hi,
I am using Infragistics 6.3 on .NET 1.1 and get a strange exception when I mouseover the Infragistics toolbar. It only occurs in the release version (not in the Visual Studio design environment).
Could someone please help and tell me why the "DockPaneCaption" thinks there is a duplicate entry in the dictionary. What do I need to do to resolve this?
System.ArgumentException: Item has already been added. Key in dictionary: "DockPaneCaption" Key being added: "DockPaneCaption" at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at Infragistics.Win.AppStyling.StyleUtilities.UpdateRoleHierarchy(Hashtable table, AssemblyStyleInfo[ assemblyInfos) at Infragistics.Win.AppStyling.StyleManager.ProcessLoadedAssembliesImpl() at Infragistics.Win.AppStyling.StyleManager.GetSharedObjectProperties(String sharedObjectName) at Infragistics.Win.AppStyling.SharedObjectCache.GetProperties() at Infragistics.Win.AppStyling.PropertyInfoCache.ParseProperty(String propertyName) at Infragistics.Win.AppStyling.PropertyInfoCache.GetProperty(String propertyName) at Infragistics.Win.AppStyling.StyleManager.GetSharedObjectPropertyValue(ComponentRole componentRole, String sharedObjectName, String propertyName) at Infragistics.Win.AppStyling.ComponentRole.GetProperty(String sharedObjectName, String propertyName) at Infragistics.Win.ToolTip.get_LeftMarginResolved() at Infragistics.Win.ToolTip.CalcLineRect(Rectangle& rect, Graphics g, String text, LocationAdjustInfo adjustInfo, Font font) at Infragistics.Win.ToolTip.CalcStringSize(String text, Graphics g, LocationAdjustInfo adjustInfo, Font font) at Infragistics.Win.ToolTip.AdjustDimensions(Rectangle& rect, Graphics g, LocationAdjustInfo adjustInfo) at Infragistics.Win.ToolTip.ReAdjustForm(Rectangle rect, LocationAdjustInfo adjustInfo) at Infragistics.Win.ToolTip.Show(Point displayLocation, Boolean rightAlign) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.DisplayToolTipHelper(String toolTipText, String toolTipTitle, String toolTipTextFormatted, String shortCutString, Boolean suppressShortcuts, Rectangle exclusionRect, Point point) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.DisplayToolTip(ToolBase tool) at Infragistics.Win.UltraWinToolbars.ToolBase.DisplayToolTip() at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.set_ImmediateToolTipDisplayMode(Boolean value) at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.OnMouseHover() at Infragistics.Win.ControlUIElementBase.NotifyMouseHover(UIElement element) at Infragistics.Win.ControlUIElementBase.ProcessMouseHover(Object sender, EventArgs e) at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) at Infragistics.Win.UltraControlBase.OnMouseHover(EventArgs e) at System.Windows.Forms.Control.WmMouseHover(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
It sounds like multiple instances of the assemblies are being loaded. You can try hooking the AssemblyResolve event of the AppDomain and determine why multiple instances of the Infragistics assemblies (e.g. Infragistics.Win) are getting loaded. I'm guessing that part of your application is using one version and you may have a usercontrol or other library that references a different version or perhaps your loading assemblies using LoadFrom, etc.
This looks like a possible threading issue, based on the stack traces. If you're using multiple threads in your application, make sure you are only modifying the user interface on the main thread. This isn't something that we can dependably "trap" with conditional statements, since the condition might change after we've confirmed that it's OK but before we take an action that will fail.
If you're not using threading in your application, then we'll need to look into this in more detail. I suggest that you submit a support request so that Developer Support can look into the problem. We'll probably need you to provide a sample project that reproduces the behavior (even if it only reproduces the behavior intermittently).
Some more clues...
When running from the GAC the application works fine (EXE version). To test deployment, I have copied all of the Infragistics Dlls from the NetAdvantage 2006....\Windows Forms\Bin directory to the bin directory of my application. The app now exceptions with the following
System.ArgumentException: Item has already been added. Key in dictionary: "UltraButtonBase" Key being added: "UltraButtonBase" at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at Infragistics.Win.AppStyling.StyleUtilities.UpdateRoleHierarchy(Hashtable table, AssemblyStyleInfo[ assemblyInfos) at Infragistics.Win.AppStyling.StyleManager.ProcessLoadedAssembliesImpl() at Infragistics.Win.AppStyling.StyleManager.GetSharedObjectProperties(String sharedObjectName) at Infragistics.Win.AppStyling.SharedObjectCache.GetProperties() at Infragistics.Win.AppStyling.PropertyInfoCache.ParseProperty(String propertyName) at Infragistics.Win.AppStyling.PropertyInfoCache.GetProperty(String propertyName) at Infragistics.Win.AppStyling.StyleManager.GetSharedObjectPropertyValue(ComponentRole componentRole, String sharedObjectName, String propertyName) at Infragistics.Win.AppStyling.ComponentRole.GetProperty(String sharedObjectName, String propertyName) at Infragistics.Win.ToolTip.get_LeftMarginResolved() at Infragistics.Win.ToolTip.CalcLineRect(Rectangle& rect, Graphics g, String text, LocationAdjustInfo adjustInfo, Font font) at Infragistics.Win.ToolTip.CalcStringSize(String text, Graphics g, LocationAdjustInfo adjustInfo, Font font) at Infragistics.Win.ToolTip.AdjustDimensions(Rectangle& rect, Graphics g, LocationAdjustInfo adjustInfo) at Infragistics.Win.ToolTip.ReAdjustForm(Rectangle rect, LocationAdjustInfo adjustInfo) at Infragistics.Win.ToolTip.Show(Point displayLocation, Boolean rightAlign) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.DisplayToolTipHelper(String toolTipText, String toolTipTitle, String toolTipTextFormatted, String shortCutString, Boolean suppressShortcuts, Rectangle exclusionRect, Point point) at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.DisplayToolTip(ToolBase tool) at Infragistics.Win.UltraWinToolbars.ToolBase.DisplayToolTip() at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.set_ImmediateToolTipDisplayMode(Boolean value) at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.OnMouseHover() at Infragistics.Win.ControlUIElementBase.NotifyMouseHover(UIElement element) at Infragistics.Win.ControlUIElementBase.ProcessMouseHover(Object sender, EventArgs e) at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) at Infragistics.Win.UltraControlBase.OnMouseHover(EventArgs e) at System.Windows.Forms.Control.WmMouseHover(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)