0
\$\begingroup\$

I have just gone into Android Studio to open a project. It will run in Android but not my Desktop configuration. Nothing of the code has been changed and I have now tried 3 projects, also a brand new project straight from the LibGDX Project Generator .jar file.

The error I get in Studio is: Exception in thread "LWJGL Application" java.lang.NullPointerException at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:322) at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setupDisplay(LwjglGraphics.java:216) at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:142) at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:124)

Process finished with exit code 0

Please can anybody help me here? thanks

\$\endgroup\$
8
  • \$\begingroup\$ Could you post the configuration settings that your Desktop project passes into LwjglApplication? \$\endgroup\$ Jan 25, 2017 at 18:14
  • \$\begingroup\$ yeah i havent changed any. For example in my Snake game: com.megabro.snake.desktop.DesktopLauncher (class) ; E:\MyDevs\LibGDX\Snake\android\assets (working directory) ; desktop (classpath of module). They were the only things I had to manually configure \$\endgroup\$ Jan 25, 2017 at 18:18
  • \$\begingroup\$ Also the only thing that changed was it prompt me to download the Android Repository revision (or something like that) \$\endgroup\$ Jan 25, 2017 at 18:19
  • \$\begingroup\$ oh, also my Nvidia drivers have just updated today also if that could be causing this? \$\endgroup\$ Jan 25, 2017 at 18:33
  • \$\begingroup\$ Now. Looking more carefully at that exception message, in this case it looks like something with LWJGL, and not with the desktop sub project. It's complaining about a null pointer. Post some info on your system: operating system, graphic card. \$\endgroup\$ Jan 26, 2017 at 3:05

1 Answer 1

1
\$\begingroup\$

I had the same problem. After I updated my NVidia drivers yesterday, I noticed that all my LibGdx Projects caused the same exception you've written above. After a lot of research on google, I found many complaints from other players which had artifacts with the new driver version and a file from NVidia about current driver problems. I tryed to rollback to the previous version and now everything works fine again. Use your "Hardware Manager" -> "Graphics Adapters" -> [Your NVidia Card] -> "Roll Back Drivers". Then you can go on with your programming project.

NVidia PDF Page 14

Problem Discusion

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .