Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358738 - In CSS, using CTabItem:selected without it parent CTabItem causes NPE
Summary: In CSS, using CTabItem:selected without it parent CTabItem causes NPE
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-23 11:12 EDT by Cristiano Gaviao CLA
Modified: 2012-08-08 13:09 EDT (History)
5 users (show)

See Also:


Attachments
this is a simple project that reproduce the problem. (17.85 KB, application/zip)
2011-09-23 11:14 EDT, Cristiano Gaviao CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cristiano Gaviao CLA 2011-09-23 11:12:55 EDT
Build Identifier: I20110805-1200

If you create a CSS file and put:

CTabItem:selected {
	background-color:  radial yellow brown 50% 50%;
	color: white;
}

and not put this:

CTabItem {
	font: Verdana 8px;
	background-color: rgb(191, 168, 143);
	color: black;
}

eclipse will throw this:

java.lang.NullPointerException
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyCSSProperty(AbstractCSSEngine.java:709)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyleDeclaration(AbstractCSSEngine.java:485)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyConditionalPseudoStyle(AbstractCSSEngine.java:439)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:390)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:342)
	at org.eclipse.e4.ui.css.swt.engine.CSSSWTApplyStylesListener$1.handleEvent(CSSSWTApplyStylesListener.java:31)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4125)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4118)
	at org.eclipse.swt.widgets.Display.runSkin(Display.java:4085)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3595)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:969)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:885)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:90)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:145)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

Reproducible: Always

Steps to Reproduce:
1. open the attached project
2. run it
3. watch the console
Comment 1 Cristiano Gaviao CLA 2011-09-23 11:14:44 EDT
Created attachment 203913 [details]
this is a simple project that reproduce the problem.
Comment 2 Cristiano Gaviao CLA 2011-09-23 11:27:16 EDT
Forgot to say that there is a File/Change Theme menu item that should be clicked to get the error...
Comment 3 Brian de Alwis CLA 2012-08-08 13:09:43 EDT
This is an old report and I'm unable to reproduce on 4.2.

Cristiano: Could you please retry and re-open if it still occurs?