Hi all! I have this strange problem with the UltraTabControl in a production environment.
- The famous red cross... I know this is a thread related issue, but I don't find the cause. We have a central menu application from which all programs are loaded in a new threads:
Thread thread2 = new Thread(() => { Form2 f2 = new Form2(); Application.Run(f2); }); thread2.SetApartmentState(AppartmentState.STA); thread2.Start();
Once the sub-program is launched, there is no interaction between the menu and this program.
- This error occurs approximately once in the week and only by ONE user.
- At the moment the error occurs, the user is not working in the application. So it crashes when the program is in an inactive/idle state.
- We had a simular problem (red cross) earlier with the UltraStatusBar, but in that case all the users were affected. Removing the date- and time-panel from the UltraWinStatusBar resolved the problem.
Can someone give me a hint where I have to search to solve this issue? @Mike Saltzman, you perhaps? (Fan of your posts!) This is the exact error and stacktrace.
Error: Index was outside the bounds of the array.
Stack: at System.Collections.Generic.HashSet`1.SetCapacity(Int32 newSize, Boolean forceNewHashCodes) at System.Collections.Generic.HashSet`1.AddIfNotPresent(T value) at Infragistics.Win.Notifications.NotificationUIElement.AddNotificationUIElementIfPossible(UIElement parent, INotificationBadgeProvider notificationProvider) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics, Nullable`1 zoomFactor) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Hello Eddy,
Thank you for contacting Infragistics. Which version of Infragistics tools are you using that causes this behavior?
Hi Michael, we use version 19.2 (Infragistics4.Win.UltraWinTabControl.v19.2 - 19.2.20192.302)
Hey Michael, how likely is it that upgrading to the latest version will fix the problem? I ask this because it takes us a lot of effort to accomplish that, so at least I have to know are chances - or is this just a default answer?
Hi Michael! We have 100+ applications on the same codebase, so upgrading isn't a realistic option (on the short term).
I encourage you to upgrade and see if the issue persists. Although I wasn't able to find the root cause of the behavior I was informed internally we may have fixed a similar issue.