OSM2World icon indicating copy to clipboard operation
OSM2World copied to clipboard

GLException: Unable to determine GraphicsConfiguration

Open clarisma opened this issue 1 year ago • 2 comments

Running Version 0.4.0 on Windows 10 results in the following exception at startup:

Exception in thread "main" com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x19b843ba]], idx 0], pfdID 4, ARB-Choosen false,
        requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]],
        chosen    GLCaps[wgl vid 4 gdi: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/0, dp/st/ms 16/8/0, dbl, mono  , sw, GLProfile[GL2/GL2.sw], on-scr[.]]]
        at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:182)
        at com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
        at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1513)
        at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:609)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4839)
        at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:729)
        at java.desktop/java.awt.Container.addNotify(Container.java:2804)
        at java.desktop/java.awt.Window.addNotify(Window.java:791)
        at java.desktop/java.awt.Frame.addNotify(Frame.java:495)
        at java.desktop/java.awt.Window.pack(Window.java:829)
        at org.osm2world.viewer.view.ViewerFrame.<init>(ViewerFrame.java:123)
        at org.osm2world.console.OSM2World.executeArgumentsGroup(OSM2World.java:205)
        at org.osm2world.console.OSM2World.main(OSM2World.java:144)

Proposed Solution

Supply --add-exports arguments to the JVM, preferably via a launcher script (based on solution to this issue):

java 
  --add-exports java.base/java.lang=ALL-UNNAMED 
  --add-exports java.desktop/sun.awt=ALL-UNNAMED 
  --add-exports java.desktop/sun.java2d=ALL-UNNAMED 
  -jar osm2world-0.4.0-SNAPSHOT.jar --gui

clarisma avatar Mar 03 '23 15:03 clarisma

Can you confirm that running OSM2World using the osm2world-windows.bat script makes a difference?

tordanik avatar Mar 03 '23 16:03 tordanik

Yes, this works, thanks.

(I am getting other exceptions when attempting to render, but I believe they are related to a graphics driver issue).

clarisma avatar Mar 03 '23 16:03 clarisma