Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Vi_O

Pages: 1 [2]
16
Here you are !

Code: [Select]

12-14 16:44:06.600: E/AndroidRuntime(18527): FATAL EXCEPTION: GLThread 10
12-14 16:44:06.600: E/AndroidRuntime(18527): java.lang.RuntimeException: [ 1323881046593 ] - ERROR: java.lang.NullPointerException
12-14 16:44:06.600: E/AndroidRuntime(18527): at com.threed.jpct.Object3D.transformVertices(Object3D.java:6316)
12-14 16:44:06.600: E/AndroidRuntime(18527): at com.threed.jpct.World.renderScene(World.java:1105)
12-14 16:44:06.600: E/AndroidRuntime(18527): at vo.ArKlee.e3d.JpctEngine.renderWorld(JpctEngine.java:170)
12-14 16:44:06.600: E/AndroidRuntime(18527): at vo.ArKlee.ArKleeActivity.onDrawFrame(ArKleeActivity.java:118)
12-14 16:44:06.600: E/AndroidRuntime(18527): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1431)
12-14 16:44:06.600: E/AndroidRuntime(18527): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1180)
12-14 16:44:06.600: E/AndroidRuntime(18527): at com.threed.jpct.Logger.log(Logger.java:189)
12-14 16:44:06.600: E/AndroidRuntime(18527): at com.threed.jpct.Logger.log(Logger.java:148)
12-14 16:44:06.600: E/AndroidRuntime(18527): at com.threed.jpct.World.renderScene(World.java:1121)
12-14 16:44:06.600: E/AndroidRuntime(18527): at vo.ArKlee.e3d.JpctEngine.renderWorld(JpctEngine.java:170)
12-14 16:44:06.600: E/AndroidRuntime(18527): at vo.ArKlee.ArKleeActivity.onDrawFrame(ArKleeActivity.java:118)
12-14 16:44:06.600: E/AndroidRuntime(18527): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1431)
12-14 16:44:06.600: E/AndroidRuntime(18527): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1180)


There is also some info log about the exception :

Code: [Select]

12-14 16:44:06.540: I/jPCT-AE(18527): OpenGL renderer initialized (using 2 texture stages)
12-14 16:44:06.580: I/jPCT-AE(18527): [ 1323881046592 ] - WARNING: There's a problem with the object list not being consistent during rendering. This is often caused by concurrent modification of jPCT objects on a thread different from the rendering thread!
12-14 16:44:06.590: I/jPCT-AE(18527): [ 1323881046593 ] - ERROR: java.lang.NullPointerException
12-14 16:44:06.590: I/jPCT-AE(18527): at com.threed.jpct.Object3D.transformVertices(Object3D.java:6316)
12-14 16:44:06.590: I/jPCT-AE(18527): at com.threed.jpct.World.renderScene(World.java:1105)
12-14 16:44:06.590: I/jPCT-AE(18527): at vo.ArKlee.e3d.JpctEngine.renderWorld(JpctEngine.java:170)
12-14 16:44:06.590: I/jPCT-AE(18527): at vo.ArKlee.ArKleeActivity.onDrawFrame(ArKleeActivity.java:118)
12-14 16:44:06.590: I/jPCT-AE(18527): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1431)
12-14 16:44:06.590: I/jPCT-AE(18527): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1180)
12-14 16:44:06.600: W/dalvikvm(18527): threadid=9: thread exiting with uncaught exception (group=0x4013a760)


Hope it helps, I know the error is not about the Loader class, but it occurs after I've tried to load serialized object from the server so I guess it is the problem.

Thanks for the quick reply

17
Hello there,

I've been trying for a while to send simple 3D objects from a server to an android device using the DeSerializer class on the server and the Loader one on the client. The object is loaded on client-side but it does give me an NullPointerException for Object3D.transformVertices when trying to rendering the world and I don't know how to fix it...

Any suggestions ?

Here's the source code server-side : (exemple with a cube)

Code: [Select]

Object3D obj = Primitives.getCube(1);
obj.setTexture("rouge");
obj.build();
_deSerializer.serialize(obj, os, true);
                byte[] serializedObject = os.toByteArray();

                return serializedObject;


Then it goes all the way to the client...

Client-side :

Code: [Select]

                Object3D objLoader = Loader.loadSerializedObject(new ByteArrayInputStream(serializedObject));
                _world.addObject(objLoader);


Can't see what I've done wrong...

Thanks by advance for the help.

Pages: 1 [2]