Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » treeviewer getchildren error sometimes(maybe a defect)
icon4.gif  treeviewer getchildren error sometimes [message #554591] Mon, 23 August 2010 16:09 Go to next message
Bright is currently offline BrightFriend
Messages: 2
Registered: July 2009
Junior Member
I have set up an application with treeviewer instead of tabletreeviewer, when i sort my column, sometimes it throws an exception "widget is disposed"

I traced the track of AbstractTreeViewer, i found somethings wired when getChildren from the treeviewer.

the items returned is more than the tree's actual item. it cause the code line 2600
int numItemsToDispose = items.length - min (> 0)
the variable min is the actual item in the tree.

i think the code block between code line 2608 and 2624 make the exception happened. It just dispose the item, not remove it from the items, so if return value of method getchildren is larger than elementChildren.length in method updateChildren(Widget widget, Object parent, Object[] elementChildren, boolean updateLabels), the exception might happen.

sorry for my bad english!
Re: treeviewer getchildren error sometimes [message #554596 is a reply to message #554591] Mon, 23 August 2010 16:15 Go to previous messageGo to next message
Bright is currently offline BrightFriend
Messages: 2
Registered: July 2009
Junior Member
my eclipse version is 3.4.1.

at the code line 2579:
Item[] items = getChildren(widget,elementChildren);

the items are more than elementChildren's size.(10% chance), the items' length is correct in 90%.

In my dubug view, the elementChildren's size is my treeviewer's input.
Re: treeviewer getchildren error sometimes [message #634167 is a reply to message #554596] Wed, 20 October 2010 16:34 Go to previous message
Federico Gaule is currently offline Federico GauleFriend
Messages: 21
Registered: September 2010
Location: Buenos Aires, Argentina
Junior Member
Hi,

Could you paste a code snippet to check what are you doing?

Thanks!
Previous Topic:Unable to install zip file, no projects found to import
Next Topic:JFace Databinding firePropertyChange never ends
Goto Forum:
  


Current Time: Thu Apr 25 18:14:08 GMT 2024

Powered by FUDForum. Page generated in 0.03996 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top