This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 423768 - [CSS] IAE exception when switching between CSS stylesheets with combo
Summary: [CSS] IAE exception when switching between CSS stylesheets with combo
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: 4.4 M4   Edit
Assignee: Daniel Rolka CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 423704
  Show dependency tree
 
Reported: 2013-12-11 02:42 EST by Daniel Rolka CLA
Modified: 2013-12-12 09:05 EST (History)
0 users

See Also:


Attachments
The CSS stylesheet that enables the CSS bridge (2.53 KB, text/css)
2013-12-11 02:42 EST, Daniel Rolka CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Rolka CLA 2013-12-11 02:42:28 EST
Created attachment 238234 [details]
The CSS stylesheet that enables the CSS bridge

Steps to reproduce the issue:

1) Enable the CSS bridge functionality by using the CSS stylesheet attached to the bug
2) Start the Eclipse, open the ColorAndFontPreferencePage dialog (Window->Preferences->Colors and Fonts) and do some changes in the 3.x theme. Close dialog
3) Open the ViewsPreferencePage dialog (Window->Preferences->Appearance) and start to switch between CSS stylesheets. Switch between those that use the Font/Color definitions and others that don't use it
4) After applying the new change and closing the 'Restart is required for the theme change to take full effect' message box you will get the IllegalArgumentException (Argument not valid -> SWT.ERROR_GRAPHIC_DISPOSED):

java.lang.IllegalArgumentException: Argument not valid
	at org.eclipse.swt.SWT.error(SWT.java:4400)
	at org.eclipse.swt.SWT.error(SWT.java:4334)
	at org.eclipse.swt.SWT.error(SWT.java:4305)
	at org.eclipse.swt.graphics.GC.setFont(GC.java:4403)
	at org.eclipse.swt.custom.CTabFolder.onPaint(CTabFolder.java:1981)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:289)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4351)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1491)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4667)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5014)
	at org.eclipse.swt.internal.win32.OS.RedrawWindow(Native Method)
	at org.eclipse.swt.widgets.Control.update(Control.java:4436)
	at org.eclipse.swt.widgets.Display.update(Display.java:4875)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:834)
Comment 1 Daniel Rolka CLA 2013-12-11 02:43:14 EST
Found in the build: I20131209-2000
Comment 2 Daniel Rolka CLA 2013-12-11 03:02:44 EST
The workaround for the issue is restarting the Eclipse after modifying the 3.x theme with the 'Window->Preferences->Colors and Fonts' preference page and before switching to other CSS stylesheet with the 'Window->Preferences->Appearance' one.

Probably the issue here is caused by the out-of-synchronization stylesheets and partial applying the new CSS stylesheet (after switching the CSS theme the user has to restart the Eclipse to get full effect) so maybe synchronizing it would be another workaround for it. I haven't checked it

Daniel
Comment 3 Daniel Rolka CLA 2013-12-11 05:38:50 EST
Gerrit review link: https://git.eclipse.org/r/#/c/19633/

Daniel
Comment 4 Paul Webster CLA 2013-12-11 10:26:52 EST
This IAE renders the workbench unusable

PW
Comment 5 Paul Webster CLA 2013-12-11 11:25:53 EST
I've released the fix as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=05044a55787792abee37f4adaef63c63198bbae5

Now the user will get the popup "must restart eclipse" and the CTabFolders won't be hosed.

We need to overhaul the CSS engine approach to resource management in bug 423813

PW
Comment 6 Daniel Rolka CLA 2013-12-12 09:05:32 EST
Verified in the build: I20131211-2000

Daniel