ShapeNet / shapenet-viewer

ShapeNet Viewer
MIT License
187 stars 25 forks source link

Exceptions when running viewer #18

Open mickey9294 opened 7 years ago

mickey9294 commented 7 years ago

I'm trying to run shapenet-viewer to render shapenet shapes. However, when I run the viewer.sh on my Ubuntu 16.04, the following exceptions show up:

Uncaught exception thrown in Thread[jME3 Main,5,main] java.lang.ExceptionInInitializerError at com.jme3.system.lwjgl.LwjglDisplay.createContext(LwjglDisplay.java:112) at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:113) at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: org.lwjgl.LWJGLException: No modes available at org.lwjgl.opengl.Display.(Display.java:141) ... 4 more Caused by: org.lwjgl.LWJGLException: No modes available at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:740) at org.lwjgl.opengl.Display.(Display.java:138) ... 4 more

Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread "jME3 Main"

My java version is:

java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

And the configure file I use just contains the following lines:

viewer.commands = [ "register shapeNetCore /home/magic/liuchuan/Projects/PointSetGeneration/data/ShapeNetCore.v1", "load model random", "show meshes", "set cameraAngleFromHorizontal 0", ]

Can you tell me how to fix it? Thank you very much!

msavva commented 7 years ago

These errors look like they are due to an OpenGL context being unavailable. This would happen if you are running the code through a remote SSH session. You would need to either run on a machine locally, or set up a server such that you can acquire an OpenGL context from a remote session. Please see issue #4 for more details.