Runtime error on moveCamera / lookAt

Started by Enigmadt, November 09, 2012, 09:15:28 AM

Previous topic - Next topic

Enigmadt

Hi,

i have made an app like HelloWorldAe.
When i compile this app it is ok but at runtime there is an error by moveCamera, lookAt or setPosition method.
If i comment out the lines with moveCamera, lookAt and setPosition then it's fine.
I have tested the HelloWorldAe example too and there is the same error.

Currently i'm at work. I post the error log when i get home.

Quote
11-09 18:55:10.017: W/dalvikvm(390): threadid=7: thread exiting with uncaught exception (group=0x4001d800)
11-09 18:55:10.017: E/AndroidRuntime(390): FATAL EXCEPTION: GLThread 8
11-09 18:55:10.017: E/AndroidRuntime(390): java.lang.NullPointerException
11-09 18:55:10.017: E/AndroidRuntime(390):    at com.enigmadt.earth.live.wallpaper.StartActivity$MyRenderer.onDrawFrame(StartActivity.java:83)
11-09 18:55:10.017: E/AndroidRuntime(390):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
11-09 18:55:10.017: E/AndroidRuntime(390):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)

On line 83 is cam.moveCamera(Camera.CAMERA_MOVEOUT, 1.0f);
I have testet the app on the emulator and on HTC Desire.
Any idea how i can solve this problem?

regards   

EgonOlsen

It's impossible to tell without looking at the exception's stack trace. Might be that it simply can't find the class files. If that's the case, look here for a solution: http://www.jpct.net/forum2/index.php/topic,2663.0.html

Enigmadt

I have solved my problem.
My mistake was that i called world.getCamera(); but getCamera return the Camera object so i got an empty Camera object.