Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340727 - [Forms] NullPointerException in ExpandableComposite
Summary: [Forms] NullPointerException in ExpandableComposite
Status: CLOSED DUPLICATE of bug 319127
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-23 04:16 EDT by David Pérez CLA
Modified: 2011-03-24 05:07 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Pérez CLA 2011-03-23 04:16:55 EDT
java.lang.NullPointerException
	at org.eclipse.ui.forms.widgets.ExpandableComposite$5.focusLost(ExpandableComposite.java:588)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:143)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
	at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2618)
	at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1920)
	at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:4504)
	at org.eclipse.swt.widgets.Canvas.WM_KILLFOCUS(Canvas.java:434)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4193)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4886)
	at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
	at org.eclipse.swt.widgets.Control.forceFocus(Control.java:995)
	at org.eclipse.swt.widgets.Control.setFixedFocus(Control.java:2980)
	at org.eclipse.swt.widgets.Composite.setFixedFocus(Composite.java:1039)
	at org.eclipse.swt.widgets.Control.fixFocus(Control.java:953)
	at org.eclipse.swt.widgets.Control.setVisible(Control.java:3407)
	at org.eclipse.ui.internal.WorkbenchPage.onDeactivate(WorkbenchPage.java:2646)
	at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:2972)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2967)
	at org.eclipse.ui.internal.WorkbenchWindow.closeAllPages(WorkbenchWindow.java:849)
	at org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchWindow.java:1696)
	at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:734)
	at org.eclipse.ui.internal.WorkbenchWindow.access$0(WorkbenchWindow.java:710)
	at org.eclipse.ui.internal.WorkbenchWindow$5.run(WorkbenchWindow.java:826)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:824)
	at org.eclipse.jface.window.WindowManager.close(WindowManager.java:109)
	at org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1106)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)


Here is the original code (org.eclipse.ui.forms_3.3.100.v20080611.jar):

					public void focusLost(FocusEvent e) {
						textLabel.redraw();
					}

I would change to this:

					public void focusLost(FocusEvent e) {
						if (textLabel != null) {
							textLabel.redraw();
						}
					}



-- Configuration Details --
Product: Eclipse 1.3.2.20110218-0812 (org.eclipse.epp.package.rcp.product)
Installed Features:
 org.eclipse.platform 3.6.2.r362_v20110210-9gF78Gs1FrIGnHDHWkEcopoN8AmxeZflGDGKQi
Comment 1 Prakash Rangaraj CLA 2011-03-23 04:22:47 EDT
Forms maintained by PDE
Comment 2 Remy Suen CLA 2011-03-23 10:12:19 EDT
Forms is owned by UA.
Comment 3 Chris Goldthorpe CLA 2011-03-23 10:49:08 EDT
What are the steps to reproduce this?
Comment 4 David Pérez CLA 2011-03-23 11:15:40 EDT
It has happened to me when quitting an RCP application, which uses a Section.
The section is populated with a Composite that holds other controls.
Comment 5 David Pérez CLA 2011-03-23 11:16:40 EDT
(In reply to comment #4)

The section is placed inside a view.
Comment 6 Chris Goldthorpe CLA 2011-03-23 12:42:18 EDT
This is the same problem as was reported in Bug 319127. Closing as duplicate.

*** This bug has been marked as a duplicate of bug 319127 ***
Comment 7 David Pérez CLA 2011-03-24 05:07:04 EDT
That's true, I'm also using the NO_TITLE style.