Unable to start activity while rajawali parses obj

275 views Asked by At

I imported this rajawali tutorial into an working example of a stereoscopic renderer. The class where I insert the rajawali code is based the AbstractRenderer in this API documentation. The import of the .obj file is ok, but as soon as i start to parse with "objParser.parse();" I get the failure: "Unable to start activity" "NUllPointerException" So as is am new to Android I am really lost. Any help would be a gift! Thank you very much! I also add the LogCat

11-18 23:16:42.359: E/libEGL(6495): call to OpenGL ES API with no current context (logged once per thread)
11-18 23:16:42.359: E/libEGL(6495): call to OpenGL ES API with no current context (logged once per thread)
11-18 23:16:42.359: E/libEGL(6495): call to OpenGL ES API with no current context (logged once per thread)
11-18 23:16:42.359: E/libEGL(6495): call to OpenGL ES API with no current context (logged once per thread)
11-18 23:16:42.359: D/AndroidRuntime(6495): Shutting down VM
11-18 23:16:42.359: W/dalvikvm(6495): threadid=1: thread exiting with uncaught exception (group=0x40a6d1f8)
11-18 23:16:42.359: E/AndroidRuntime(6495): FATAL EXCEPTION: main
11-18 23:16:42.359: E/AndroidRuntime(6495): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sungame.sdeck.sample/com.sungame.sdeck.sample.SampleActivity}: java.lang.NullPointerException
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.os.Looper.loop(Looper.java:137)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.app.ActivityThread.main(ActivityThread.java:4424)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at java.lang.reflect.Method.invokeNative(Native Method)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at java.lang.reflect.Method.invoke(Method.java:511)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at dalvik.system.NativeStart.main(Native Method)
11-18 23:16:42.359: E/AndroidRuntime(6495): Caused by: java.lang.NullPointerException
11-18 23:16:42.359: E/AndroidRuntime(6495):     at rajawali.materials.MaterialManager.addMaterial(MaterialManager.java:49)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at rajawali.Object3D.setMaterial(Object3D.java:568)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at rajawali.parser.LoaderOBJ$MaterialLib.setMaterial(LoaderOBJ.java:634)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at rajawali.parser.LoaderOBJ.parse(LoaderOBJ.java:338)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at com.sungame.sdeck.sample.render.StereoRenderer.<init>(StereoRenderer.java:86)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at com.sungame.sdeck.sample.SampleActivity.onCreate(SampleActivity.java:52)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.app.Activity.performCreate(Activity.java:4465)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
11-18 23:16:42.359: E/AndroidRuntime(6495):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
11-18 23:16:42.359: E/AndroidRuntime(6495):     ... 11 more
11-18 23:16:42.757: I/dalvikvm(6495): threadid=3: reacting to signal 3
11-18 23:16:42.757: I/dalvikvm(6495): Wrote stack traces to '/data/anr/traces.txt'
11-18 23:16:42.898: I/dalvikvm(6495): threadid=3: reacting to signal 3
11-18 23:16:42.898: I/dalvikvm(6495): Wrote stack traces to '/data/anr/traces.txt'
0

There are 0 answers