Help! I can't see anything!

dunmatt
Posts: 8
Joined: Thu Aug 09, 2012 3:58 pm

Help! I can't see anything!

Post by dunmatt »

Hi all. I'm trying desperately to get anything to work. To do that it would be really handy if I could see what was going on. To do that my code is as follows:

Code: Select all

  public void showCollisionWorld() {
//    JFrame frame = new JFrame();
//    frame.getContentPane().add(new JbulletDebugDrawerCanvas());
//    frame.setVisible(true);
//    IDebugDraw drawer = new JbulletDebugDrawer();
//    dynamicsWorld.setDebugDrawer(drawer);

    try {
      JbulletDebugDemoApplication app = new JbulletDebugDemoApplication(LWJGL.getGL(), dynamicsWorld);
      app.initPhysics();
      app.getDynamicsWorld().setDebugDrawer(new GLDebugDrawer(LWJGL.getGL()));
      String[] args = {};
      LWJGL.main(args, 800, 600, "Bullet Physics Demo", app);
    } catch (LWJGLException ex) {
      Logger.getLogger(World.class.getName()).log(Level.SEVERE, null, ex);
    } catch (Exception ex) {
      Logger.getLogger(World.class.getName()).log(Level.SEVERE, null, ex);
    }
  }
I more or less just copied it from the jBullet demo source. The problem is, when I try to run it I get:

Code: Select all

Aug 13, 2012 6:55:35 PM com.robotsim.scenegraph.World showCollisionWorld
SEVERE: null
java.lang.NullPointerException
	at java.lang.String.getBytes(String.java:994)
	at org.lwjgl.opengl.LinuxDisplay.nSetTitle(Native Method)
	at org.lwjgl.opengl.LinuxDisplay.setTitle(LinuxDisplay.java:754)
	at org.lwjgl.opengl.Display.setTitle(Display.java:567)
	at org.lwjgl.opengl.Display.createWindow(Display.java:312)
	at org.lwjgl.opengl.Display.create(Display.java:873)
	at org.lwjgl.opengl.Display.create(Display.java:782)
	at com.bulletphysics.demos.opengl.LWJGL.main(LWJGL.java:54)
	at com.robotsim.scenegraph.World.showCollisionWorld(World.java:59)
	at com.robotsim.ui.SuperRobotViewer.<init>(SuperRobotViewer.java:26)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
	at ade.gui.ADEGuiCreatorUtil.createGuiPanel(ADEGuiCreatorUtil.java:27)
	at ade.gui.ADEGuiExternalFrame.createExternalGUIFrames(ADEGuiExternalFrame.java:157)
	at ade.gui.ADEGuiExternalFrame$1.run(ADEGuiExternalFrame.java:132)
What am I doing wrong?
dunmatt
Posts: 8
Joined: Thu Aug 09, 2012 3:58 pm

Re: Help! I can't see anything!

Post by dunmatt »

Arg. Figured it out. I had an lwjgl.jar file left over from another project contaminating the classpath. Apparently it was of an incompatible version. All is well now, I can see my simbot.