本文介绍了java:IllegalStateException - 尚未创建缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器中有一个奇怪的例外。

同一个应用程序(java,swing)在几台服务器上运行。

每台服务器都运行双监视器。
相同的jre版本(jre 6版本24)
所有这些都在相当的CPU /内存消耗。

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.

只有其中一个 - 当我将我的应用程序从一个监视器拖到另一个监视器,它会抛出 java.lang.IllegalStateException 异常。我在下面附上了完整的例外情况。
有没有人有任何想法?

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 ?

谢谢。

现在,例外情况:

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.BufferStrategyPaintManager.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)


推荐答案

尝试将以下参数添加到java命令行:

Try adding the following parameter to your java command line:

-Dsun.java2d.d3d = false

这篇关于java:IllegalStateException - 尚未创建缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 18:25