Java opengl 错误

Java opengl 错误

如果我在 ubuntu 18.04 上启动 sweethome3d 我会收到以下错误:

Sweet Home 3D will exit now because of a fatal error in the 3D rendering system of you computer. Please update DirectX/OpenGL drivers of your computer graphics card.

在命令行上:

com.jogamp.opengl.GLException: J3D-Renderer-1: Error making temp context(1) current: display 0x7fdd7415d0d0, context 0x7fdd742df3f8, drawable X11OnscreenGLXDrawable[Realized true,
    Factory   jogamp.opengl.x11.glx.X11GLXDrawableFactory@64ad9e58,
    Handle    0x26000a3,
    Surface   JAWTWindow[0x37ad6ca][JVM version: 1.8.0_181 (1.8.0 update 181)
JAWT version: 0x10004, CA_LAYER: false, isLayeredSurface false, bounds [ 0 / 0  887 x 755 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], pixelScale 1.0x1.0, shallUseOffscreenLayer false, isOffscreenLayerSurface false, attachedSurfaceLayer 0x0, windowHandle 0x26000a3, surfaceHandle 0x26000a3, bounds [ 0 / 0  887 x 755 ], insets [ l 0, r 0 - t 0, b 0 - 0x0], window [0/0 887x755], pixels[scale 1.0, 1.0 -> 887x755], visible true, lockedExt false,
    config AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection :0.0, unitID 0, awtDevice X11GraphicsDevice[screen=0], handle 0x0], idx 0],
    chosen    GLCaps[glx vid 0xa9, fbc 0x1c0: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
    requested GLCaps[rgba 5/5/5/1, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
    X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0xa9],
    encapsulated X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :3, unitID 0, handle 0x7fdd7415d0d0, owner true, JAWTToolkitLock[obj 0x6764021d, isOwner true, <41344b32, 49e35212>[count 1, qsz 0, owner <J3D-Renderer-1>]]], idx 0], visualID 0xa9, fbConfigID 0x1c0,
    requested GLCaps[rgba 5/5/5/1, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]],
    chosen    GLCaps[glx vid 0xa9, fbc 0x1c0: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]]],
    awtComponent com.eteks.sweethome3d.j3d.Component3DManager$ObservedCanvas3D[canvas2,0,0,887x755],
    surfaceLock <5377a3f1, 47907bfc>[count 1, qsz 0, owner <J3D-Renderer-1>]]]
    at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:393)
    at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:765)
    at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:648)
    at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586)
    at javax.media.j3d.JoglPipeline.createNewContext(JoglPipeline.java:6411)
    at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:4612)
    at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2386)
    at javax.media.j3d.Renderer.doWork(Renderer.java:881)
    at javax.media.j3d.J3dThread.run(J3dThread.java:271)
ErX11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:3, 0x7fdd7402caf0, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:3, 0x7fdd7415d0d0, refCount 1, unCloseable false]

我的安装有什么问题?我该如何修复?

答案1

我有同样的问题。查看谷歌后我发现https://github.com/hharrison/java3d-core/issues/23http://forum.jogamp.org/problem-using-jogl-2-3-2-on-linux-td4038557.html。这说:在JOGL 2.3.3中已修复。

我不会使用源代码更改来更新我的 Ubuntu,因此我寻找了 Ubuntu 软件包 libjogl2-2.3.3,但未找到。Ubuntu 20.4 仍然有 libjogl-2.3.2。

也许一定是 Ubuntu 的一个错误?

相关内容