NullPointer at any example


I have reinstalled the jmePlatform 3.0 beta and started some examples from the JmeTests package, but I get always the following NullPointer:

SEVERE: Uncaught exception thrown in Thread[AWT-EventQueue-0,6,main]


at com.jme3.input.awt.AwtMouseInput$

at java.awt.event.InvocationEvent.dispatch(

at java.awt.EventQueue.dispatchEventImpl(

at java.awt.EventQueue.access$000(

at java.awt.EventQueue$

at java.awt.EventQueue$

at Method)


at java.awt.EventQueue.dispatchEvent(

at java.awt.EventDispatchThread.pumpOneEventForFilters(

at java.awt.EventDispatchThread.pumpEventsForFilter(

at java.awt.EventDispatchThread.pumpEventsForHierarchy(

at java.awt.EventDispatchThread.pumpEvents(

at java.awt.EventDispatchThread.pumpEvents(


Feb 7, 2012 9:56:52 AM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation

INFO: Uniform m_VertexColor is not declared in shader [ShaderSource[name=Common/MatDefs/Misc/Unshaded.vert, defines, type=Vertex], ShaderSource[name=Common/MatDefs/Misc/Unshaded.frag, defines, type=Fragment]].

Feb 7, 2012 9:56:52 AM com.jme3.renderer.lwjgl.LwjglRenderer cleanup

INFO: Deleting objects and invalidating state

Feb 7, 2012 9:56:52 AM com.jme3.system.lwjgl.LwjglOffscreenBuffer deinitInThread

INFO: Offscreen buffer destroyed.

After a Update to the actual stabel version: the same problem.

Can anybody help me?

It looks like your mouse isn’t being created properly for the canvas… Are you able to run the demos from

Did you create a new JmeTests project? The old one obviously contains the old code.

Yes, I have creates a new JmeTest Project.

I have tested a bit more: The problem only occurs if the example starts with a “select display settings” frame. The TestCanvas example works without problems.

OS and version? Java JVM and version?

Linux Mint 11 (based on Ubuntu 11.04)

Kernel Linux 2.6.38-8-generic

java version “1.6.0_26”

Java™ SE Runtime Environment (build 1.6.0_26-b03)

Java HotSpot™ 64-Bit Server VM (build 20.1-b02, mixed mode)


I still have these problems. But now unfortunately I have one more problem. The jmePlatform crashes during coding with the following segmentation fault:

[java]~/jmonkeyplatform/bin $ ./jmonkeyplatform

Unknown option -Dsun.java2d.noddraw=true

The program ‘<unknown>’ received an X Window System error.

This probably reflects a bug in the program.

The error was ‘BadWindow (invalid Window parameter)’.

(Details: serial 12675 error_code 3 request_code 20 minor_code 0)

(Note to programmers: normally, X errors are reported asynchronously;

that is, you will receive the error a while after causing it.

To debug your program, run it with the --sync command line

option to change this behavior. You can then get a meaningful

backtrace from your debugger if you break on the gdk_x_error() function.)


A fatal error has been detected by the Java Runtime Environment:


SIGSEGV (0xb) at pc=0x00007f0703b4da38, pid=7643, tid=139668133607168


JRE version: 6.0_26-b03

Java VM: Java HotSpot™ 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops)

Problematic frame:

C [] float+0xd43a38


An error report file with more information is saved as:



If you would like to submit a bug report, please visit:


f./…/platform/lib/nbexec: line 548: 7643 Aborted “/usr/lib/jvm/java-6-sun/bin/java” -Djdk.home="/usr/lib/jvm/java-6-sun" -classpath “/home/jan/jmonkeyplatform/platform/lib/boot.jar:/home/jan/jmonkeyplatform/platform/lib/org-openide-modules.jar:/home/jan/jmonkeyplatform/platform/lib/org-openide-util.jar:/home/jan/jmonkeyplatform/platform/lib/org-openide-util-lookup.jar:/usr/lib/jvm/java-6-sun/lib/dt.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar” -Dnetbeans.system_http_proxy=“DIRECT” -Dnetbeans.system_http_non_proxy_hosts="" -Dnetbeans.dirs="./…/jmonkeyplatform:./…/extra:./…/ide:./…/java:" -Dnetbeans.home="/home/jan/jmonkeyplatform/platform" ‘-Xms24m’ ‘-Xmx512m’ ‘-XX:PermSize=256m’ -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="/home/jan/.jmonkeyplatform/3.0beta/var/log/heapdump.hprof" org.netbeans.Main --userdir “/home/jan/.jmonkeyplatform/3.0beta” “–branding” “jmonkeyplatform” “-Dsun.java2d.noddraw=true” “-Dsun.awt.noerasebackground=true” “-Dsun.java2d.d3d=false” “-Dsun.java2d.opengl=false” “-Dsun.java2d.pmoffscreen=false” 0<&0[/java]

It looks like a Nvidia driver bug. Has anybody an idea how to solve this?

I have solved my last problem by using the Oracle JDK version 6 instead of OpenJDK.

My first problem related to the NullPointer at the application start can be prevented with the following line:


I’m still confused a little bit, because a weeks ago all examples works with the settings dialog at the beginning of each example.

Sorry for digging out this, but I came across the same problem today. What helped was deleting the prefs.xml under $HOME/.java/.userPrefs.
Strange enough, this file lived in a folder named _!'o!^@“v!'4!aw"l!(k!)!”&!'4!~w"p!'4!~@!g!$:!.g!w :-?. However, according to this doc the folder name should have a similar name as your game?!