Tree component freezes after removing an item

Alright, I have a Tree component that’s bound to an array of value objects . I call a function that removes an array item. For some reason, the Tree component doesn’t get updated. So, I force an update by calling invalidateList(). Now, the item disappears from the tree. Everything seems fine. Unfortunately, at this point, when I attempt to select any item on the tree, the program freezes. A while later, I receive this message:


Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
at ListCollectionView.as$75::ListCollectionViewCursor/get current()
at mx.controls.treeClasses::HierarchicalViewCursor/get current()[C:\autobuild\3.2.0\frameworks\projects\framework\s rc\mx\controls reeClasses\HierarchicalViewCursor. as:203]
at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::setSelectionData Loop()[C:\autobuild\3.2.0\frameworks\projects\framework\s rc\mx\controls\listClasses\ListBase.as:6346]
at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::commitSelectedIt ems()[C:\autobuild\3.2.0\frameworks\projects\framework\s rc\mx\controls\listClasses\ListBase.as:6280]
at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::commitSelectedIt em()[C:\autobuild\3.2.0\frameworks\projects\framework\s rc\mx\controls\listClasses\ListBase.as:6257]
at mx.controls.listClasses::ListBase/set selectedItem()[C:\autobuild\3.2.0\frameworks\projects\framework\s rc\mx\controls\listClasses\ListBase.as:2884]


If anyone knows the solution, I’d really appreciate it. Thank you very much. I look forward to a reply.