java.lang.NullPointerException
<p>Users of my Android app are reporting that they receive a Forced Close message when an incoming call comes in.</p>

<p>I have a Service Receiver and a phone state listener class to determine the status of the phone. When the state is "CALL_STATE_RINGING", I call upon the method stopAllPlayback() in my main Activity. It is at this point that users report "Forced Close" messages.</p>

<p>Can you help me determine where the problem might be? I'm new to Java so I'm not 100% sure how to troubleshoot based on a stack trace.</p>

<p>Here's the stack trace:</p>

<pre><code>java.lang.NullPointerException
at com.tdoo.toodoo.DroidGap.stopAllPlayback(DroidGap.java:190)
at com.tdoo.toodoo.MyPhoneStateListener.onCallStateChanged(MyPhoneStateListener.java:21)
at android.telephony.PhoneStateListener$2.handleMessage(PhoneStateListener.java:319)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p><strong>UPDATE:</strong> i've just been able to replicate the error myself by putting my phone under a lot of stress (using adb shell monkey), then calling my phone. It seems that this error is occuring on slower phones, but I have the Droid Incredible which is significantly faster.</p>

<p>Does this give anyone any new ideas?</p>

<p>Thanks!
Lewis</p>
