这看起来很疯狂,但我已经能够重现我的JOGL应用程序崩溃的问题,如果我没有使用外部显示器。我所做的只是启动应用程序,它立即变得反应迟钝。如果我插入外接显示器,问题就会消失。
如果我让app运行,然后在调试器中随机暂停,我得到以下堆栈跟踪:
GraphicsApp at localhost:3173 (Suspended)
Daemon System Thread [Attach Listener] (Suspended)
Daemon System Thread [Signal Dispatcher] (Suspended)
Daemon System Thread [Finalizer] (Suspended)
Object.wait(long) line: not available [native method]
ReferenceQueue<T>.remove(long) line: not available
ReferenceQueue<T>.remove() line: not available
Finalizer$FinalizerThread.run() line: not available
Daemon System Thread [Reference Handler] (Suspended)
Object.wait(long) line: not available [native method]
Reference$Lock(Object).wait() line: 485
Reference$ReferenceHandler.run() line: not available
Daemon System Thread [Java2D Disposer] (Suspended)
Object.wait(long) line: not available [native method]
ReferenceQueue<T>.remove(long) line: not available
ReferenceQueue<T>.remove() line: not available
Disposer.run() line: not available
Thread.run() line: not available
Daemon Thread [AWT-Windows] (Suspended)
WToolkit.eventLoop() line: not available [native method]
WToolkit.run() line: not available
Thread.run() line: not available
Thread [AWT-Shutdown] (Suspended)
Object.wait(long) line: not available [native method]
Object.wait() line: 485
AWTAutoShutdown.run() line: not available
Thread.run() line: not available
Thread [AWT-EventQueue-0] (Suspended)
WGLExtImpl.dispatch_wglMakeContextCurrent1(long, long, long, long) line: not available [native method]
WGLExtImpl.wglMakeContextCurrent(long, long, long) line: 658
WindowsOnscreenWGLContext(WindowsWGLContext).wglMakeContextCurrent(long, long, long) line: 104
WindowsOnscreenWGLContext(WindowsWGLContext).releaseImpl() line: 315
WindowsOnscreenWGLContext(GLContextImpl).release() line: 151
GLDrawableHelper.invokeGL(GLDrawable, GLContext, Runnable, Runnable) line: 291
GLCanvas$DisplayOnEventDispatchThreadAction.run() line: 674
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Daemon System Thread [D3D Screen Updater] (Suspended)
Object.wait(long) line: not available [native method]
D3DScreenUpdateManager.run() line: not available
Thread.run() line: not available
Thread [DestroyJavaVM] (Suspended)
Thread [Timer-0] (Suspended)
Object.wait(long) line: not available [native method]
EventQueue$1AWTInvocationLock(Object).wait() line: 485
EventQueue.invokeAndWait(Runnable) line: not available
AWTThreadingPlugin.invokeOnOpenGLThread(Runnable) line: 99
ThreadingImpl.invokeOnOpenGLThread(Runnable) line: 192
Threading.invokeOnOpenGLThread(Runnable) line: 164
GLCanvas.maybeDoSingleThreadedWorkaround(Runnable, Runnable) line: 591
GLCanvas.display() line: 301
AnimatorImpl.display(Animator, boolean, boolean) line: 50
FPSAnimator(Animator).display() line: 154
FPSAnimator$1.run() line: 95
TimerThread.mainLoop() line: not available
TimerThread.run() line: not available [local variables unavailable]
我还没有测试过我是否可以使用OpenGL重现这个问题。
我做错了吗?也许我对显示器问题感到困惑,还有别的什么?
答案 0 :(得分:0)
你有可能在某处设置了VSSyncEnabled(true)或gl.setSwapInterval(&lt; some nonzero value&gt;)?如果您想了解更多信息,请搜索“垂直回溯”here。
答案 1 :(得分:0)
你在运行-Djava.awt.headless = true?
答案 2 :(得分:0)
您使用的是英特尔集成显卡芯片组吗?我已经看到了使用JOGL支持多显示器或外部显示器的问题。您可以尝试使用另一台具有不同图形卡的计算机来查看行为是否发生变化 - 如果是这样,您当前的图形驱动程序可能出现故障。