Project: Eclipse_Platform_UI
Bug 139298 [ErrorHandling] eclipse will silently fail to launch with invalid colorDefinition value
Reported: 2006-04-28 16:02:41 | Status: verified fixed

I had a color value of "30,14, 231", and the erroneous space after the comma caused Eclipse to silently fail to launch without any error messages other than the following from .metadata/.log. Seems that better error tolerance would be good. Note that the launch was a runtime workbench. !ENTRY org.eclipse.ui 4 0 2006-04-28 12:50:32.565 !MESSAGE For input string: " 231" !STACK 0 org.eclipse.jface.resource.DataFormatException: For input string: " 231" at org.eclipse.jface.resource.StringConverter.asRGB(StringConverter.java:560) at org.eclipse.ui.themes.ColorUtil.getColorValue(ColorUtil.java:122) at org.eclipse.ui.internal.themes.ColorDefinition.getValue(ColorDefinition.java:146) at org.eclipse.ui.internal.themes.ThemeElementHelper.installColor(ThemeElementHelper.java:261) at org.eclipse.ui.internal.themes.ThemeElementHelper.populateRegistry(ThemeElementHelper.java:156) at org.eclipse.ui.internal.Workbench.initializeApplicationColors(Workbench.java:1123) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1065) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1847) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/StringConverter.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorDefinition.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/themes/ColorUtil.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/themes/ThemeAPITest.java