Bug 559154 - Theme switch causes IllegalArgumentException in ExpandableComposite on repaint
Summary: Theme switch causes IllegalArgumentException in ExpandableComposite on repaint
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.14   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 549916
  Show dependency tree
 
Reported: 2020-01-14 07:38 EST by Dominik G. CLA
Modified: 2020-10-12 09:25 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 Dominik G. CLA 2020-01-14 07:38:35 EST
What steps will reproduce the problem?
1. Open a plugin.xml file in the Plugin Manifest Editor and select the Overview tab (or another view/editor with an ExpandableComposite)
2. Switch from the classic theme to the dark theme
3. Switch from the dark theme back to the classic theme
4. Change the size of the plugin.xml Editor
5. Every repaint of an ExpandableComposite causes the following error because the internally used colors were already disposed.

Exception Stack Trace:
java.lang.IllegalArgumentException: Argument not valid
	at org.eclipse.swt.SWT.error(SWT.java:4701)
	at org.eclipse.swt.SWT.error(SWT.java:4635)
	at org.eclipse.swt.SWT.error(SWT.java:4606)
	at org.eclipse.swt.graphics.GC.setForeground(GC.java:4344)
	at org.eclipse.ui.forms.widgets.Section.onPaint(Section.java:398)
	at org.eclipse.ui.forms.widgets.ExpandableComposite.lambda$0(ExpandableComposite.java:574)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4175)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1654)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4816)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:348)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4827)
	at org.eclipse.swt.internal.win32.OS.RedrawWindow(Native Method)
	at org.eclipse.swt.widgets.Control.update(Control.java:4595)
	at org.eclipse.swt.widgets.Control.update(Control.java:4588)
	at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.lambda$1(SashLayout.java:100)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:216)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4175)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3988)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3587)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:660)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Comment 1 Peter Wichers CLA 2020-10-12 09:17:32 EDT
Using a newer version (4.18), I could not reproduce the problem. 
Is this still an issue?