Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid app crashs on loading
    primarykey
    data
    text
    <p>I made an 3d app (min3D framework) wich runs inside a layout. The layout contains some buttons to control the game. This works fine. But the layout appears faster than the game itself and when i touch the area where the app is loading it will crash. If i wait and don't touch the area i get no errors. Everything works fine then. How can I fix this? </p> <p>I now know that the app is crashing on the point where it should add an object wich isn't loaded yet. Its all in the onTouchEvent function. But why is this working befor the initScene has finished o.O?</p> <p>logCat:</p> <pre><code>01-13 21:17:20.476: E/AndroidRuntime(20189): FATAL EXCEPTION: main 01-13 21:17:20.476: E/AndroidRuntime(20189): java.lang.NullPointerException 01-13 21:17:20.476: E/AndroidRuntime(20189): at com.appboss.min3d.core.Scene.addChild(Scene.java:112) 01-13 21:17:20.476: E/AndroidRuntime(20189): at com.appboss.soyuz.Rocket.onTouchEvent(Rocket.java:250) 01-13 21:17:20.476: E/AndroidRuntime(20189): at android.app.Activity.dispatchTouchEvent(Activity.java:2231) 01-13 21:17:20.476: E/AndroidRuntime(20189): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1795) 01-13 21:17:20.476: E/AndroidRuntime(20189): at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2336) 01-13 21:17:20.476: E/AndroidRuntime(20189): at android.view.ViewRoot.handleMessage(ViewRoot.java:1976) 01-13 21:17:20.476: E/AndroidRuntime(20189): at android.os.Handler.dispatchMessage(Handler.java:99) 01-13 21:17:20.476: E/AndroidRuntime(20189): at android.os.Looper.loop(Looper.java:150) 01-13 21:17:20.476: E/AndroidRuntime(20189): at android.app.ActivityThread.main(ActivityThread.java:4277) 01-13 21:17:20.476: E/AndroidRuntime(20189): at java.lang.reflect.Method.invokeNative(Native Method) 01-13 21:17:20.476: E/AndroidRuntime(20189): at java.lang.reflect.Method.invoke(Method.java:507) 01-13 21:17:20.476: E/AndroidRuntime(20189): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 01-13 21:17:20.476: E/AndroidRuntime(20189): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 01-13 21:17:20.476: E/AndroidRuntime(20189): at dalvik.system.NativeStart.main(Native Method </code></pre> <p>)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload