Author Topic: NullPointer @ GLRenderer.drawVertexArray  (Read 2327 times)

Offline raft

  • quad
  • ******
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
NullPointer @ GLRenderer.drawVertexArray
« on: June 30, 2010, 01:05:23 am »
any ideas what may cause this ? i've tried to create a test case but no luck since now.

Code: [Select]
E/AndroidRuntime( 2703): Uncaught handler: thread GLThread exiting due to uncaught exception
E/AndroidRuntime( 2703): java.lang.RuntimeException: java.lang.NullPointerException
E/AndroidRuntime( 2703): at raft.jumpy.android.WhatActivity$MyRenderer.onDrawFrame(WhatActivity.java:230)
E/AndroidRuntime( 2703): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:955)
E/AndroidRuntime( 2703): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:887)
E/AndroidRuntime( 2703): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 2703): at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:1758)
E/AndroidRuntime( 2703): at com.threed.jpct.World.draw(World.java:1277)
E/AndroidRuntime( 2703): at com.threed.jpct.World.draw(World.java:1059)
E/AndroidRuntime( 2703): at raft.jumpy.android.WhatActivity$MyRenderer.onDrawFrame(WhatActivity.java:202)
E/AndroidRuntime( 2339): ... 2 more

these are the previous log entries, if helps. btw, these objects are cloned from a master. the master is built indeed but warning still complains about they are not built yet.
Code: [Select]
I/jPCT-AE ( 2339): [ Wed Jun 30 01:38:57 GMT+03:00 2010 ] - WARNING: Object object13 hasn't been build yet. Forcing build()!
I/jPCT-AE ( 2339): Subobject of object 11/object13 compiled to flat fixed point data using 48 vertices in 2ms!
I/jPCT-AE ( 2339): Object 11/object13 compiled to 1 subobjects in 7ms!
I/jPCT-AE ( 2339): [ Wed Jun 30 01:38:59 GMT+03:00 2010 ] - WARNING: Object object14 hasn't been build yet. Forcing build()!
I/jPCT-AE ( 2339): Subobject of object 12/object14 compiled to flat fixed point data using 48 vertices in 1ms!
I/jPCT-AE ( 2339): Object 12/object14 compiled to 1 subobjects in 4ms!
I/jPCT-AE ( 2339): [ Wed Jun 30 01:38:59 GMT+03:00 2010 ] - WARNING: Object GeoSphere0_jPCT13 hasn't been build yet. Forcing build()!
I/jPCT-AE ( 2339): Subobject of object 13/GeoSphere0_jPCT13 compiled to flat fixed point data using 240 vertices in 3ms!
I/jPCT-AE ( 2339): Object 13/GeoSphere0_jPCT13 compiled to 1 subobjects in 13ms!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: NullPointer @ GLRenderer.drawVertexArray
« Reply #1 on: June 30, 2010, 07:31:29 am »
Judging from the line, it looks like as if it's trying to access a null texture...pretty strange, i've currently no idea how this can happen unless flushing the TextureManager interleaves with rendering or something.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: NullPointer @ GLRenderer.drawVertexArray
« Reply #2 on: June 30, 2010, 11:04:13 am »
Try to set Config.aggressiveStripping=false; and see if that helps...

Offline raft

  • quad
  • ******
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: NullPointer @ GLRenderer.drawVertexArray
« Reply #3 on: June 30, 2010, 12:54:02 pm »
oops, flush is the keyword here. there is flush in onSurfaceCreated(..) method :-[
i cant believe i couldn't notice that. sorry :( copy paste is the mother of all evil ;D