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

Bug 342057

Summary: NPE in Table.sendDoubleSelection when item has no label
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: lshanmug
Version: 3.7   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Nick Edgar CLA 2011-04-06 13:51:26 EDT
on 3.7M2, Cocoa, 32-bit

- had a checkbox table with an item that had no label
- double-clicked the item (outside the checkbox)
- it failed with:

Daemon Thread [Thread-0] (Suspended (exception NullPointerException))	
	Table.sendDoubleSelection() line: 2910	
	Display.windowProc(int, int) line: 4527	
	OS.objc_msgSendSuper(objc_super, int, int) line: not available [native method]	
	Table(Widget).callSuper(int, int, int) line: 202	
	Table(Widget).mouseDown(int, int, int) line: 920	
	Table(Control).mouseDown(int, int, int) line: 2160	
	Table.mouseDown(int, int, int) line: 1888	
	Display.windowProc(int, int, int) line: 4653	
	OS.objc_msgSendSuper(objc_super, int, int) line: not available [native method]	
	Shell(Widget).callSuper(int, int, int) line: 202	
	Shell(Widget).windowSendEvent(int, int, int) line: 1753	
	Shell.windowSendEvent(int, int, int) line: 1825	
	Display.windowProc(int, int, int) line: 4713	
	OS.objc_msgSendSuper(objc_super, int, int) line: not available [native method]	
	Display.applicationSendEvent(int, int, int) line: 4285	
	Display.applicationProc(int, int, int) line: 4352	
	OS.objc_msgSend(int, int, int) line: not available [native method]	
	NSApplication.sendEvent(NSEvent) line: 101	
	Display.readAndDispatch() line: 3097	
	Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2405	
	Workbench.runUI() line: 2369	
	Workbench.access$4(Workbench) line: 2221	
	Workbench$5.run() line: 500	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 493	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	IDEApplication.start(IApplicationContext) line: 113	
	EclipseAppHandle.run(Object) line: 194	
	EclipseAppLauncher.runApplication(Object) line: 110	
	EclipseAppLauncher.start(Object) line: 79	
	EclipseStarter.run(Object) line: 368	
	EclipseStarter.run(String[], Runnable) line: 179	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 592	
	Main.invokeFramework(String[], URL[]) line: 559	
	Main.basicRun(String[]) line: 514	
	Main.run(String[]) line: 1311	
	Main.main(String[]) line: 1287	

The line in question is:
	int columnIndex = (int)/*64*/tableView.clickedColumn ();
	id column = columns.objectAtIndex (columnIndex);
-->	if (column.id == checkColumn.id) return;

columnIndex is -1, so column gets null.
Comment 1 Lakshmi P Shanmugam CLA 2011-04-07 09:15:56 EDT
This was fixed in 3.6. I can see it is fixed in 3.7 HEAD.

*** This bug has been marked as a duplicate of bug 313197 ***
Comment 2 Lakshmi P Shanmugam CLA 2011-04-07 09:22:06 EDT
Does it happen with 3.7 build for you?