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 :¬)
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.
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 --------------------------
-----------------------------------------------------
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
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.
Glad to see im not alone :¬)