This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 432184 - [Forms] NPE in ScrolledForm#setBackground()
Summary: [Forms] NPE in ScrolledForm#setBackground()
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Brian de Alwis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-07 13:42 EDT by Brian de Alwis CLA
Modified: 2014-04-29 12:45 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2014-04-07 13:42:59 EDT
I hit an NPE in 4.4, trying to open the Java Mission Control with the Dark Theme.  The ScrolledForm is triggering CSS changes in its constructor before the content has been created.

Thread [main] (Suspended (exception NullPointerException))	
	owns: RunnableLock  (id=278)	
	ScrolledForm.setBackground(Color) line: 125	
	CSSPropertyBackgroundSWTHandler.applyCSSPropertyBackgroundColor(Object, CSSValue, String, CSSEngine) line: 86	
	CSSPropertyBackgroundSWTHandler(AbstractCSSPropertyBackgroundHandler).applyCSSProperty(Object, String, CSSValue, String, CSSEngine) line: 35	
	CSSPropertyBackgroundSWTHandler.applyCSSProperty(Object, String, CSSValue, String, CSSEngine) line: 43	
	CSSSWTEngineImpl(AbstractCSSEngine).applyCSSProperty(Object, String, CSSValue, String) line: 690	
	CSSSWTEngineImpl(AbstractCSSEngine).applyStyleDeclaration(Object, CSSStyleDeclaration, String) line: 488	
	CSSSWTEngineImpl(AbstractCSSEngine).applyStyles(Object, boolean, boolean) line: 406	
	CSSSWTEngineImpl(AbstractCSSEngine).applyStyles(Object, boolean) line: 351	
	CSSSWTApplyStylesListener$1.handleEvent(Event) line: 32	
	EventTable.sendEvent(Event) line: 84	
	Display.sendEvent(EventTable, Event) line: 4186	
	Display.sendEvent(int, Event) line: 4176	
	Display.runSkin() line: 4143	
	ScrolledForm(Composite).updateLayout(boolean) line: 1200	
	ScrolledForm(Composite).setScrollBarVisible(ScrollBar, boolean) line: 1097	
	ScrollBar.setVisible(boolean) line: 723	
	ScrolledForm(ScrolledComposite).<init>(Composite, int) line: 150	
	ScrolledForm(SharedScrolledComposite).<init>(Composite, int) line: 63	
	ScrolledForm.<init>(Composite, int) line: 67	
	FormToolkit.createScrolledForm(Composite) line: 660	
	OverviewTab(FormPage).createPartControl(Composite) line: 148	
	ConsoleEditor(MultiPageEditorPart).addPage(int, IEditorPart, IEditorInput) line: 243	
	ConsoleEditor(FormEditor).addPage(int, IEditorPart, IEditorInput) line: 325	
	ConsoleEditor(ToolbarFormEditor).addPageSafe(int, IFormPage, IEditorInput) line: 172	
	ConsoleEditor(ToolbarFormEditor).addFormPageContributionItem(FormPageContributionItem, IEditorInput) line: 162	
	ConsoleEditor(DesignEditor).doInitializeFormPageContributions() line: 195	
	DesignEditor.access$0(DesignEditor) line: 191	
	DesignEditor$1$1.run() line: 156	
	DisplayToolkit$SafeDisplayRunnable(DisplayToolkit$SafeRunnable).run() line: 51	
	RunnableLock.run() line: 35	
	UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 136	
	Display.runAsyncMessages(boolean) line: 3981	
	Display.readAndDispatch() line: 3658	
	PartRenderingEngine$9.run() line: 1135	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 1016	
	E4Workbench.createAndRunUI(MApplicationElement) line: 148	
	Workbench$5.run() line: 635	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 578	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 150	
	IDEApplication.start(IApplicationContext) line: 125	
	EclipseAppHandle.run(Object) line: 196	
	EclipseAppLauncher.runApplication(Object) line: 134	
	EclipseAppLauncher.start(Object) line: 104	
	EclipseStarter.run(Object) line: 379	
	EclipseStarter.run(String[], Runnable) line: 233	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 601	
	Main.invokeFramework(String[], URL[]) line: 648	
	Main.basicRun(String[]) line: 603	
	Main.run(String[]) line: 1465	
	Main.main(String[]) line: 1438
Comment 2 Brian de Alwis CLA 2014-04-29 12:45:42 EDT
Verified in I20140428-2000: I don't see NPEs occurring.