java: IllegalStateException - Buffers have not been created
I have a weird exception in one my servers.
The same application (java, swing ) runs on several servers. Each server runs with dual monitors. Same jre version (jre 6 version 24) All of them in a decent CPU/memory consumption.In only one of them - when I drag my app from one monitor to the other it throws a java.lang.IllegalStateException
exception. I have attached the full exception below.
Does anyone have any idea ?
Thank you.
And now, behold, the exception :
java.lang.IllegalStateException: Buffers have not been created
at sun.awt.windows.WComponentPeer.getBackBuffer(Unknown Source)
at java.awt.Component$FlipBufferStrategy.getBackBuffer(Unknown Source)
at java.awt.Component$FlipBufferStrategy.updateInternalBuffers(Unknown Source)
at java.awt.Component$FlipBufferStrategy.revalidate(Unknown Source)
at java.awt.Component$FlipBufferStrategy.revalidate(Unknown Source)
at java.awt.Component$FlipBufferStrategy.getDrawGraphics(Unknown Source)
at javax.swing.Buffe开发者_StackOverflow社区rStrategyPaintManager.prepare(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Try adding the following parameter to your java command line:
-Dsun.java2d.d3d=false
having tried the following,
-Dsun.java2d.d3d=false
-Dsun.java2d.noddraw=true
-Dsun.java2d.ddoffscreen=false
-DJ2D_D3D=false
and NOT finding a solution, i stumbled on this which worked.
jframe.createBufferStrategy(1);
http://www.java-gaming.org/index.php/topic,25021.0
This is the case in the Oracle bug database: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6933331.
From the bug evaluation:
.. has no consequences other than a stack trace dump in a console (no hang, no visual artifacts were reported)
精彩评论