Android app: java.lang.NullPointerException
<p>My app crashes sometimes on Samsung phones:
"java.lang.NullPointerException" but it doesn't reference to my code anywhere.
What can I do to avoid this error?</p>

<pre><code>java.lang.NullPointerException
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:2476)
at android.app.ActivityThread.access$1800(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:952)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)
</code></pre>
