awysocki/C2DM-PhoneGap — Issue #3: Crash on push receive when application close.
Author: legarspol
Created: 2011-12-06 17:20:30+00:00
State: open

Hi !
First of all congrats for your work ! it's a great job and well commented.

But... I got a crash:

after installing your app, close it thanks to the app manager.

Then send a notification to your device and your application crash. (at least my version of this sample crash...)

I use this librairie:

Google APIs [Android 2.2]
com.android.ide.eclipse.adt.LIBRARIES
phonegap-1.2.0.jar

If I understand the bug come from: (C2DMPlugin.java:102)
Which, I think, is : gwebView.sendJavascript( _d );
in /plugin/C2DM/C2DMPlugin.java

Do you have an idea of where it come from ?
Maybe I use somes bad librarrys ... ?
Thanks for your help,

Legarspol

12-06 17:57:16.104: V/C2DMReceiver(3624): Constructor
12-06 17:57:16.124: V/C2DMReceiver:onMessage(3624): Message: Fantastic!!!
12-06 17:57:16.124: V/C2DMReceiver:onMessage extras(3624): Bonjour ceci est le corps du message
12-06 17:57:16.124: V/C2DMReceiver:onMessage(3624): {"msg":"Bonjour ceci est le corps du message","event":"message"}
12-06 17:57:16.124: V/C2DMPlugin:sendJavascript(3624): javascript:null({"msg":"Bonjour ceci est le corps du message","event":"message"})
12-06 17:57:16.124: W/dalvikvm(3624): threadid=9: thread exiting with uncaught exception (group=0x4001d560)
12-06 17:57:16.124: E/AndroidRuntime(3624): FATAL EXCEPTION: IntentService[man]
12-06 17:57:16.124: E/AndroidRuntime(3624): java.lang.NullPointerException
12-06 17:57:16.124: E/AndroidRuntime(3624):	at com.plugin.C2DM.C2DMPlugin.sendJavascript(C2DMPlugin.java:102)
12-06 17:57:16.124: E/AndroidRuntime(3624):	at com.phonegap.c2dm.C2DMReceiver.onMessage(C2DMReceiver.java:80)
12-06 17:57:16.124: E/AndroidRuntime(3624):	at com.google.android.c2dm.C2DMBaseReceiver.onHandleIntent(C2DMBaseReceiver.java:107)
12-06 17:57:16.124: E/AndroidRuntime(3624):	at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:59)
12-06 17:57:16.124: E/AndroidRuntime(3624):	at android.os.Handler.dispatchMessage(Handler.java:99)
12-06 17:57:16.124: E/AndroidRuntime(3624):	at android.os.Looper.loop(Looper.java:130)
12-06 17:57:16.124: E/AndroidRuntime(3624):	at android.os.HandlerThread.run(HandlerThread.java:60)