Hi,
We have recently upgraded from Infragistics 2011.1 to 2014.1 and detected an issue with calling Clear() on UltraListView.Items - a NullReferenceException gets thrown at: Infragistics.Win.UltraWinListView.UltraListViewItem.get_TextSizeIconic().
There was previously no issue in that code before. Is this a known but or has something changed in that code?
Thanks!
Hello Rostislav,
Thank you for contacting Infragistics Support.
I have investigated your issue, and found it to be a known issue. This issue was logged in our internal tracking system with Development ID 182922. So I’ve created a case for you CAS-145249-Q3C7W5 and will update you for the progress of this issue via the mentioned case. You could reach your case following the link below:
https://es.infragistics.com/my-account/support-activity
Thank you for using Infragistics Components.
Thanks so much for a quick reply! :)
We will await the fix in the next few weeks. In the meantime - is there any workaround for this that we could use?
Thanks again,
Ross
I know this is old but I had a similar problem in 19.1 with SubItemColumns. It was right after I added a custom SortComparer to a SubItemColumn. Removing the comparer removed the error so I added a function to null the sortcompares prior to the clear and that seems to have helped as well.
Craig,
The issue that this thread was originally created for and development issue 182922 was logged for where a NullReferenceException is thrown when calling Clear on the UltraListView.Items collection was resolved and is not reproducible in 18.1.20181.177.
The call stack that Michael provided is different from the original issue and if that is what you are seeing, we need a sample to look into what is happening.
Working properly in 18.1.20181.177
The bug has resurfaced in version 17.2I am using suspend layout, and confirmed that no event dependencies.in previous versions was working fine, with no problems, and no changes to affected code for quite a few version updates.If for simply clearing a list, if i make my own version of Clear, i can bypass the bug.However, when changing the order of items in a list, and keeping a reference to a selected itemI cannot bypass this bug.
My guess is that you have an internal event in infragistics source code fired by the ulttralistview container that is trying to update some event items
This is really messing up a large application--If i add the following to step through changes Private Sub UltraListView1_PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Handles UltraListView1.PropertyChanged MessageBox.Show(e.ChangeInfo.PropId.ToString()) End SubThen the bug dissapears. Of course this is not practical, but it does demonstrate that the problem exists int eh internal event handling withing your ultralistview being used in detail mode.The only event i am handling, is on item activated, and i have removed this to confirm that it is not the source of the problems.Here is a complete stack trace
Immeadiate frames on call stack: at Infragistics.Win.UltraWinListView.UltraListViewItem.get_UIElement() at Infragistics.Win.UltraWinListView.SubItemEditorOwner.GetEditorElement(Object ownerContext) at Infragistics.Win.EditorWithMask.ResolveAppearance(AppearanceData& appData, AppearancePropFlags& requestedProps, EmbeddableEditorOwnerBase owner, Object ownerContext) at Infragistics.Win.EditorWithMaskEmbeddableUIElement.InitAppearance(AppearanceData& appData, AppearancePropFlags& requestedProps) at Infragistics.Win.EditorWithMaskEmbeddableUIElement.GetImage() at Infragistics.Win.EditorWithMaskEmbeddableUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.UltraWinListView.UltraListView.OnPropertyChanged(PropChangeInfo propChange) at Infragistics.Win.UltraWinListView.UltraListView.OnPropertyChanged(PropertyChangedEventArgs e) at Infragistics.Win.UltraWinListView.UltraListView.OnSubObjectPropChanged(PropChangeInfo propChange) at Infragistics.Shared.SubObjectBase.NotifyPropChange(PropChangeInfo trigger) at Infragistics.Win.UltraWinListView.UltraListViewItemsCollection.RemoveHelper(Int32 index, Boolean notify) at SilverEarth.SeCommerce.WinAdmin.CatalogProductDisplayOrderControl.btnMoveUp_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at Infragistics.Win.Misc.UltraButtonBase.OnClick(EventArgs e) at Infragistics.Win.Misc.UltraButton.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)Walk of Stack Frames follow
Caller: raise_UnhandledExceptionClass Name: WindowsFormsApplicationBaseFile Name and Line: | Line # 0
Caller: OnUnhandledExceptionClass Name: WindowsFormsApplicationBaseFile Name and Line: | Line # 0
Caller: OnThreadExceptionClass Name: ThreadContextFile Name and Line: | Line # 0
Caller: WndProcExceptionClass Name: ControlFile Name and Line: | Line # 0
Caller: CallbackClass Name: NativeWindowFile Name and Line: | Line # 0
Caller: DefWndProcClass Name: NativeWindowFile Name and Line: | Line # 0
Caller: WndProcClass Name: UiaProviderControlNativeWindowFile Name and Line: | Line # 0
Caller: WndProcClass Name: GestureNativeWindowFile Name and Line: | Line # 0
Caller: DispatchMessageWClass Name: UnsafeNativeMethodsFile Name and Line: | Line # 0
Caller: System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoopClass Name: ComponentManagerFile Name and Line: | Line # 0
Caller: RunMessageLoopInnerClass Name: ThreadContextFile Name and Line: | Line # 0
Caller: RunMessageLoopClass Name: ThreadContextFile Name and Line: | Line # 0
Caller: OnRunClass Name: WindowsFormsApplicationBaseFile Name and Line: | Line # 0
Caller: DoApplicationModelClass Name: WindowsFormsApplicationBaseFile Name and Line: | Line # 0
Caller: RunClass Name: WindowsFormsApplicationBaseFile Name and Line: | Line # 0
Caller: MainClass Name: MyApplicationFile Name and Line: | Line # 0
Error: Object reference not set to an instance of an object.
Wondering if this was ever resolved? Or did it resurface. I'm still getting this error in 17.1. The workaround still works though.