Hello. I am encountering an exception in my code when running in a remote session on a Windows Server 2008 R2 SP1 machine. (Using Infragistics4.Win.UltraWinTree.v12.2.dll.) I cannot reproduce the issue on Server 2008 SP2 or Server 2003.
This appears to happen when loading > 200 nodes into the tree, each with the same 16x16 image.
System.ArgumentException: Parameter is not valid. at System.Drawing.Image.get_Width() at Infragistics.Win.UltraWinTree.UltraTreeNode.get_ImageSizeResolved() at Infragistics.Win.UltraWinTree.UltraTreeNode.CalcItemSizeInternal(Int32& height, Int32& width) at Infragistics.Win.UltraWinTree.UltraTreeNode.get_Size() at Infragistics.Win.UltraWinTree.UltraTreeNode.get_ItemHeightResolved() at Infragistics.Win.UltraWinTree.UltraTreeNode.get_ItemHeightResolvedWithSpacing() at Infragistics.Win.UltraWinTree.VisibleNodesManager.RecalulateScrollSize(Boolean isInReinitialize) at Infragistics.Win.UltraWinTree.VisibleNodesManager.Reinitialize() at Infragistics.Win.UltraWinTree.UltraTreeNode.get_VisibleIndex() at Infragistics.Win.UltraWinTree.UltraTree.ExpandCollapseAllHelper(Boolean expand, ExpandAllType expandAllType) at Infragistics.Win.UltraWinTree.UltraTree.ExpandAll()
Suggestions where I might look or how I might find out why it's not working in this environment? It feels memory related but there appears to be plenty of physical and virtual memory available on the machine when the exception happens.
I don't think this is related to memory, it looks more like a GDI problem - the image that the tree is trying to get from the node is not valid in some way. This can happen the image was disposed, for example.
So you might want to take a look at where this image is being created and who's referencing it. Perhaps it's created by some object which is getting disposed while the tree is still referencing the image,
Hi,
Have you been able to resolve your issue ? . If you still have any concerns or questions, please do not hesitate to write us.
Regards