Bug 83711 [JFace] NPE in DeviceResourceManager.allocate()
Using I20050125-0800, I keep on getting these SWT errors: Error Jan 26, 2005 15:36:05.797 Failed to execute runnable (java.lang.NullPointerException) org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:2837) at org.eclipse.swt.SWT.error(SWT.java:2762) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:121) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2787) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2458) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1575) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1541) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:287) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:220) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:274) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) 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:585) at org.eclipse.core.launcher.Main.basicRun(Main.java:255) at org.eclipse.core.launcher.Main.run(Main.java:811) at org.eclipse.core.launcher.Main.main(Main.java:795) Caused by: java.lang.NullPointerException at org.eclipse.jface.resource.DeviceResourceManager.allocate(DeviceResourceManager.java:57) at org.eclipse.jface.resource.AbstractResourceManager.create(AbstractResourceManager.java:87) at org.eclipse.jface.resource.ResourceManager.createImageWithDefault(ResourceManager.java:104) at org.eclipse.jface.resource.ImageRegistry.get(ImageRegistry.java:203) at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getImage(DefaultMarkerAnnotationAccess.java:335) at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.paint(DefaultMarkerAnnotationAccess.java:234) at org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint(AnnotationRulerColumn.java:708) at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:537) at org.eclipse.jface.text.source.AnnotationRulerColumn.redraw(AnnotationRulerColumn.java:830) at org.eclipse.jface.text.source.AnnotationRulerColumn$6.run(AnnotationRulerColumn.java:817) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:118) ... 17 more
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ResourceManager.java
* @throws DeviceResourceException if unable to create the color
     */
    public final Color createColor(ColorDescriptor descriptor) throws DeviceResourceException {
        return (Color)create(descriptor);
    }
    /**
     * Allocates a color, given its RGB values. Any color allocated in this
     * manner must be disposed by calling disposeColor(...) and never by calling 
     * Color.dispose() directly.
     * 
     * @since 3.1 
     *
     * @param descriptor descriptor for the color to create
     * @return the Color described by the given ColorDescriptor (not null)
     * @throws DeviceResourceException if unable to create the color
     */
    public final Color createColor(RGB descriptor) throws DeviceResourceException {
        return createColor(new RGBColorDescriptor(descriptor));
    }
    
    /**
     * Undoes everything that was done by a call to createColor(...).
     * 
     * @since 3.1 
     *
     * @param descriptor RGB value of the color to dispose
     */
    public final void destroyColor(RGB descriptor) {
        destroyColor(new RGBColorDescriptor(descriptor));
    }