We have made zero code changes between win forms 2009.1000 and the hot fix 2009.2012 versions but now on doing this line of code
Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at Infragistics.Win.UltraWinTree.NodeClientAreaUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement,Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements() at Infragistics.Win.UltraWinTree.UltraTreeUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement,Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements() at Infragistics.Win.UltraWinTree.UltraTreeNode.BringIntoViewHelper(Boolean includeChildNodes,Boolean includeHorizontal, Boolean includeVertical, Boolean leftOnly) at Infragistics.Win.UltraWinTree.UltraTreeNode.BringIntoViewHelper(Boolean includeChildNodes, Boolean includeHorizontal) at Infragistics.Win.UltraWinTree.UltraTree.SetActiveNode(UltraTreeNode node, Boolean bringIntoView, Boolean adjustHorizontalPosition) at Infragistics.Win.UltraWinTree.UltraTree.set_ActiveNode(UltraTreeNode value) at Program.Main.ultraTree1_Build(Int32 mode) at Program.Main.Treeview(Int32 type)Thanks :¬)
Hmm, we are getting the same error too. Same circumstances with no code changes between the orignal release and the hotfix.
It seems to happen when we are setting the ActiveNode to something other than nothing (in our case we have just added a new node).
This only is happening if there exists at least one node in the TreeView before attempting to set the ActiveNode.
Forgot to include the call stack:
at System.Collections.ArrayList.get_Item(Int32 index) at Infragistics.Win.UltraWinTree.UltraTreeNode.IsFirstVisibleNodeInIslandHelper(Int32 topNodeVisibleIndex) at Infragistics.Win.UltraWinTree.UltraTreeNode.DisplaysHeaderAreaHelper(Int32 topNodeVisibleIndex) at Infragistics.Win.UltraWinTree.UltraTreeNode.get_DisplaysHeaderArea() at Infragistics.Win.UltraWinTree.NodeClientAreaUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements() at Infragistics.Win.UltraWinTree.UltraTreeUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements() at Infragistics.Win.UltraWinTree.UltraTreeNode.BringIntoViewHelper(Boolean includeChildNodes, Boolean includeHorizontal, Boolean includeVertical, Boolean leftOnly) at Infragistics.Win.UltraWinTree.UltraTreeNode.BringIntoViewHelper(Boolean includeChildNodes, Boolean includeHorizontal) at Infragistics.Win.UltraWinTree.UltraTree.SetActiveNode(UltraTreeNode node, Boolean bringIntoView, Boolean adjustHorizontalPosition) at Infragistics.Win.UltraWinTree.UltraTree.SetActiveNode(UltraTreeNode node, Boolean bringIntoView) at Infragistics.Win.UltraWinTree.UltraTree.SetActiveNode(UltraTreeNode node) at Infragistics.Win.UltraWinTree.UltraTree.set_ActiveNode(UltraTreeNode value)
I was not able to reproduce this problem with the latest build; I tried (1) activating a node that is out of the viewable area on a buttom click and (2) activating a child of a collapsed node, and I didn't get an exception. Since more than one person got this to happen it is obviously not terribly difficult to reproduce, but either I am missing a step or the bug has already been addressed. If you can post a small sample that demonstrates the problem, or provide any details that might help to reproduce, we can take a look.
Thank you for attempting to track this downI was hoping a diff of 2009.1000 and 2009.2012 would show up changes in wintree that could make these things happenIn case this helpsIt only occurs in our program if you try to ultraTree1->ActiveNode=keyNode;a node that Exists and is Visibleif you collapse the tree the crash does not occurI will try to write a example program but our real world program makes heavy use of infragistics and i bet I wont be able to make it occur in a small proglet I will try on monday Again many thanks
Ok spent alot of time creating a proglet that pretends to do whatour real world application does and there is NO crash :¬(
But.... I did some random code slashing to see if i could get the problem to dissapearand I found that twhen i moved the ultraTree1->EndUpdate() before the ultraTree1->Active=keyNiodethe crash went away
I belive the crash is to do with our usage of Node->Override->NodeAppearance and this setactive before the endupdatebut its a guess--------------------FROM-------------------
// Begin UpdateultraTree1->BeginUpdate();ultraTree1->Nodes->Clear();ultraTree1->ImageList=imageList1;for(i=0;i<40;i++){ ultraTree1->Appearances->Add(); ultraTree1->Appearances[i]->Image=i;}
// DO LOTS OF NODE ADDS HERE
//ultraTree1->ActiveNode=keyNode; ultraTree1->ActiveNode->BringIntoView();
// End UpdateultraTree1->EndUpdate();
------------------- TO --------------------------
-----------------------------------------------------
Yes, the cause is setting the ActiveNode while painting is suspended. That is of course a bug which will be addressed in a future release. The easiest solution for you is to move the ActiveNode assignment outside the BeginUpdate/EndUpdate block, since you gain nothing by having it in there anyway.
we are getting the same error too, how can i download build 2029. Thanks.
This issue seems resolved (for us, anyway) as of build 2029. Thanks.
I have the same problem without any BeginUpdate(). However EndUpdate() works as a workaround for me, too. I guess the VisibleNodesManager stuff called from EndUpdate() does what has to be done..
bmcloughlin and dpalau:
I've passed the information on this thread to Developer Support, so that a support case will be logged for each of you. That way, you'll be notified when a service release containing the changes that Brian mentions is published. The workaround Brian mentioned should get you up-and-running again in the meantime.
Thank you for verifying my findings :¬)