NullPointerException in VertexBuffer toString when loading model

Hello,

first I started with jMonkey SDK and building a mobile app via Netbeans. It worked out fine.

Then I created a project and via eclipse and gradle I build a android app which I run on my phone. But, when loading my blender model the following stacktrace appears:

[java]09-03 08:53:29.561: D/com.jme3.renderer.android.OGLESShaderRenderer(5337): FINE compile success: Common/MatDefs/Light/Lighting.vert
09-03 08:53:29.561: D/com.jme3.renderer.android.OGLESShaderRenderer(5337): FINE compile success: Common/MatDefs/Light/Lighting.frag
09-03 08:53:29.571: D/com.jme3.renderer.android.OGLESShaderRenderer(5337): FINE shader link success
09-03 08:53:29.571: D/com.jme3.util.NativeObjectManager(5337): FINEST Registered: Shader[numSources=2, numUniforms=18, shaderSources=[ShaderSource[name=Common/MatDefs/Light/Lighting.vert, defines, type=Vertex, language=GLSL100], ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment, language=GLSL100]]]
09-03 08:53:52.171: W/dalvikvm(5337): threadid=11: thread exiting with uncaught exception (group=0x41902d88)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): SEVERE Exception thrown in Thread[GLThread 13140,5,main]
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): java.lang.NullPointerException
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.scene.VertexBuffer.toString(VertexBuffer.java:989)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.util.NativeObjectManager.registerObject(NativeObjectManager.java:113)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.android.OGLESShaderRenderer.updateBufferData(OGLESShaderRenderer.java:1888)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.android.OGLESShaderRenderer.setVertexAttrib(OGLESShaderRenderer.java:2006)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.android.OGLESShaderRenderer.setVertexAttrib(OGLESShaderRenderer.java:2077)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.android.OGLESShaderRenderer.renderMeshDefault(OGLESShaderRenderer.java:2317)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.android.OGLESShaderRenderer.renderMesh(OGLESShaderRenderer.java:2358)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.material.Material.renderMultipassLighting(Material.java:838)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.material.Material.render(Material.java:1107)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:523)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:322)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:374)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:763)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:719)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:983)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.renderer.RenderManager.render(RenderManager.java:1029)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.app.SimpleApplication.update(SimpleApplication.java:252)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.app.AndroidHarness.update(AndroidHarness.java:467)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at se.ce.game.spr.android.SpaceRaceActivity.update(SpaceRaceActivity.java:51)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at com.jme3.system.android.OGLESContext.onDrawFrame(OGLESContext.java:349)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
09-03 08:53:52.241: E/com.jme3.app.AndroidHarness(5337): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
09-03 08:53:52.601: D/dalvikvm(5337): GC_FOR_ALLOC freed 1090K, 7% free 55295K/59408K, paused 32ms, total 34ms
09-03 08:53:54.331: D/com.jme3.app.Application(5337): FINE Closing application: se.ce.game.spr.SpaceRaceApp
[/java]

It raises some questions:

  1. Is gradle/eclipse building it incorrectly since Netbeans could build it somehow?
  2. The error is really suspicious, NullPointerException in a toString?
  3. Could it be any error with the model, like it’s too big for the phones memory?

Thanks!