Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318623

Summary: SWT crashes on unhandled exception in tree/table setdata listener
Product: [Eclipse Project] Platform Reporter: Lakshmi P Shanmugam <lshanmug>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: pinnamur, Silenio_Quarti
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
crash-log none

Description Lakshmi P Shanmugam CLA 2010-07-01 11:05:55 EDT
Created attachment 173225 [details]
crash-log

Run the snippet below.

public class Snippet {
public static void main(String[] args) {
	int size = 100;
	Display display = new Display();
	Shell shell = new Shell(display);
	shell.setLayout(new FillLayout());
	final Table table = new Table(shell, SWT.VIRTUAL);
	table.setHeaderVisible(true);
	table.setItemCount(size);
	final TableColumn column1 = new TableColumn(table, SWT.NONE);
	column1.setText("Key");
	column1.setWidth(200);
	table.addListener(SWT.SetData, new Listener() {
		public void handleEvent(Event e) {
			throw new RuntimeException();
		}
	});
	shell.setSize(shell.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, 300);
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
	display.dispose();
}
}
Comment 1 Lakshmi P Shanmugam CLA 2010-07-01 11:10:45 EDT
On Windows and Mac, App doesn't crash and exception is printed on the console.
Comment 2 Praveen CLA 2010-07-01 14:24:00 EDT
This looks similar to bug#285749
Comment 3 Silenio Quarti CLA 2010-08-13 21:36:58 EDT
Marking as dup of crash in pango_layout_new() because of pending exception in callin.

*** This bug has been marked as a duplicate of bug 322222 ***