Bug 39443 - GTK Error calling TreeItem.getExpanded() on a tree item being disposed.
Summary: GTK Error calling TreeItem.getExpanded() on a tree item being disposed.
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 major (vote)
Target Milestone: 2.1.3   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-27 16:09 EDT by Eric Bordeau CLA
Modified: 2019-03-28 08:44 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Bordeau CLA 2003-06-27 16:09:03 EDT
Here's a simple test case that works just fine on Motif, Windows and OS X, but
crashes on GTK.  We do something similar in GEF and it crashes the entire
workbench -- I couldn't find anything in the log or console that even showed an
error occured.  This test case here shows the following error message in the
console:

Gtk-ERROR **: file gtktreestore.c: line 576 (gtk_tree_store_get_path): assertion
failed: (G_NODE (iter->user_data)->parent != NULL)


import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.*;

public class TreeTest {

public static void main(String[] args) {
	Shell shell = new Shell();
	Tree tree = new Tree(shell, SWT.NONE);
	final TreeItem item1 = new TreeItem(tree, SWT.NONE);
	item1.setText("Item 1");
	item1.addDisposeListener(new DisposeListener() {
		public void widgetDisposed(DisposeEvent e) {
			boolean expanded = item1.getExpanded();
		}
	});
	tree.removeAll();
	shell.open();
	Display display = Display.getDefault();
	while (!shell.isDisposed())
		if (!display.readAndDispatch())
			display.sleep();
	display.dispose();
}

}
Comment 1 Debbie Wilson CLA 2003-06-30 11:43:03 EDT
Looks like SWT?
Comment 2 Felipe Heidrich CLA 2003-07-04 12:56:04 EDT
Fixed in HEAD > 20030704
Comment 3 Felipe Heidrich CLA 2004-01-27 15:51:34 EST
backported to Eclipse 2.1.3