English 中文(简体)
如果我没有使用外部监视器,我的JOGL会崩溃
原标题:My JOGL crashes if I m not using an external monitor

这看起来很疯狂,但我已经能够重现一个问题,如果我不使用外部监视器,我的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来重现这个问题。

我做错什么了吗?也许我对显示器的问题感到困惑,这是其他问题?

问题回答

你有没有可能在某个地方或gl.setSwapInterval(<;某个非零值>;)设置了VSyncEnabled(true)?搜索“垂直回扫”如果您想了解更多信息,请点击此处

你在运行Djava.awt.headless=true吗?

您使用的是Intel集成图形芯片组吗?我看到了一些JOGL支持多显示器或外部显示器的问题。您可以在另一台带有不同显卡的计算机上尝试,看看行为是否发生了变化——如果发生了变化,则可能是您当前的图形驱动程序出现了故障。





相关问题
OpenGL 3D Selection

I am trying to create a 3D robot that should perform certain actions when certain body parts are clicked. I have successfully (sort of) implemented picking in that if you click on any x-plane part, it ...

Why and when should you use hoops 3d graphics? [closed]

My company needs 3D visualization for our commercial applications (CAD, mesh manipulation, computational geometry). We are tired of true vision 3D (tv3d), which we ve been using for years (poor ...

Prerequisite for learning directx

I am from .net C# background and I want to learn DirectX. I have knowledge of C++ but I am fairly new to graphic world. I am little confused about how to start learning directx, should I start ...

Radial plotting algorithm

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry ...

Determine VRAM size on windows

I need to determine roughly how much VRAM a system s graphics card has. I know all the reasons why I shouldn t but I do. It doesn t need to be perfect (some cards lie etc.) but I need a ballpark. On ...

Mask white color out of PNG image on iPhone

I know that there are already 2 relevant posts on that, but it s not clear... So the case is this...: I have a UIImage which consists of a png file requested from a url on the net. Is it possible to ...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签