NullPointerException in SunGraphics2D.revalidateAl

Does any of you guys know something about the error below? I get this sometimes when using popup menu inside a Canvas3D from Java3D.

I do call setLightWeightPopupEnabled(false);

java.lang.NullPointerException
at sun.java2d.SunGraphics2D.revalidateAll(SunGraphics2D.java:2087)
at sun.java2d.SunGraphics2D.getCompClip(SunGraphics2D.java:440)
at sun.java2d.SunGraphics2D.invalidateClip(SunGraphics2D.java:1641)
at sun.java2d.SunGraphics2D.setClip(SunGraphics2D.java:1747)
at sun.java2d.SunGraphics2D.setClip(SunGraphics2D.java:1738)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4796)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4740)
at javax.swing.JComponent._paintImmediately(JComponent.java:4685)
at javax.swing.JComponent.paintImmediately(JComponent.java:4488)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueue
Utilities.java:117)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:
201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:15
1)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

This error was due to not invoking swing operations from within the awt-event thread.