Android Programming: Intent.getExtras() seems to be stopping execution flow in a method somehow
<p>I was messing around with the Android SDK, and noticed that in one of the examples for receiving SMS messages, the execution of onReceive never got past Intent.getExtras(). I added Logs before and after that line to be sure, and no logs after getExtras are executed.
Android emulator version is 4.0.3.
Can anyone point out some flaw in this code that I'm not seeing, or offer a workaround or solution to this seemingly random and frustrating issue? </p>

<pre><code>public class SmsReceiver extends BroadcastReceiver 
{
    @Override
    public void onReceive(Context context, Intent intent) 
    {
        Log.i("smsreceiver", "Intent: " + intent.getAction()); //Shows up in LogCat normally
        Bundle bundle = intent.getExtras();
        Log.i("smsreceiver", "after"); //this is never reached, and nothing after this is executed

        Object messages[] = (Object[]) bundle.get("pdus");
        SmsMessage smsMessage[] = new SmsMessage[messages.length];
        for (int n = 0; n &lt; messages.length; n++) 
        {
            smsMessage[n] = SmsMessage.createFromPdu((byte[])messages[n]);

        }
        Log.i("smsreceiver", "Message: " + smsMessage[0].getMessageBody());

    }
}
</code></pre>
