这看起来很疯狂,但我已经能够重现一个问题,如果我不使用外部监视器,我的JOGL应用程序就会崩溃。我所做的只是启动应用程序,它立即变得没有响应。如果我插入外部显示器,问题就会消失。
如果我让应用程序运行,然后在调试器中随机暂停它,我会得到以下堆栈跟踪:
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来重现这个问题。
我做错什么了吗?也许我对显示器的问题感到困惑,这是其他问题?