TheSimpleWay / gtalksms

Automatically exported from code.google.com/p/gtalksms
0 stars 0 forks source link

Crash when sending Intent from Tasker #274

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Sometimes, but not always, gtalksms will crash when receiving an intent:

I/ActivityManager(  205): Start proc com.googlecode.gtalksms for broadcast 
com.googlecode.gtalksms/.receivers.PublicIntentReceiver: pid=2623 uid=10137 
gids={3002, 3001, 1006, 3003, 1015, 1007}
E/gtalksms( 2623): Using log without initialize settings manager. 
[Ljava.lang.StackTraceElement;@40d73428
I/ActivityManager(  205): START {act=android.intent.action.MAIN 
cat=[android.intent.category.LAUNCHER] flg=0x10000000 
pkg=net.dinglisch.android.taskerm cmp=net.dinglisch.android.taskerm/.Tasker 
bnds=[120,103][240,254]} from pid 423
W/dalvikvm( 2623): threadid=1: thread exiting with uncaught exception 
(group=0x40a3e1f8)
E/AndroidRuntime( 2623): FATAL EXCEPTION: main
E/AndroidRuntime( 2623): java.lang.RuntimeException: Unable to create service 
com.googlecode.gtalksms.MainService: 
android.content.ReceiverCallNotAllowedException: IntentReceiver components are 
not allowed to register to receive intents
E/AndroidRuntime( 2623):    at 
android.app.ActivityThread.handleCreateService(ActivityThread.java:2386)
E/AndroidRuntime( 2623):    at 
android.app.ActivityThread.access$1600(ActivityThread.java:132)
E/AndroidRuntime( 2623):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
E/AndroidRuntime( 2623):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2623):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2623):    at 
android.app.ActivityThread.main(ActivityThread.java:4575)
E/AndroidRuntime( 2623):    at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime( 2623):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 2623):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
E/AndroidRuntime( 2623):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
E/AndroidRuntime( 2623):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2623): Caused by: 
android.content.ReceiverCallNotAllowedException: IntentReceiver components are 
not allowed to register to receive intents
E/AndroidRuntime( 2623):    at 
android.app.ReceiverRestrictedContext.registerReceiver(ContextImpl.java:123)
E/AndroidRuntime( 2623):    at 
android.app.ReceiverRestrictedContext.registerReceiver(ContextImpl.java:117)
E/AndroidRuntime( 2623):    at 
com.googlecode.gtalksms.receivers.PublicIntentReceiver.onServiceStart(PublicInte
ntReceiver.java:49)
E/AndroidRuntime( 2623):    at 
com.googlecode.gtalksms.MainService.onCreate(MainService.java:403)
E/AndroidRuntime( 2623):    at 
android.app.ActivityThread.handleCreateService(ActivityThread.java:2376)
E/AndroidRuntime( 2623):    ... 10 more

The intent sent contains the action googlecode.gtalksms.action.CONNECT, with 
the token as extra data (token:SECRETKEY). Target is set to BroadcastReceiver.

Original issue reported on code.google.com by samuel.t...@gmail.com on 17 Jun 2012 at 6:01

GoogleCodeExporter commented 8 years ago
The previous stack trace was with the Market version. With the beta version, I 
get a NPE instead:

E/AndroidRuntime( 2912): java.lang.RuntimeException: Unable to start receiver 
com.googlecode.gtalksms.receivers.PublicIntentReceiver: 
java.lang.NullPointerException
E/AndroidRuntime( 2912):    at 
android.app.ActivityThread.handleReceiver(ActivityThread.java:2249)
E/AndroidRuntime( 2912):    at 
android.app.ActivityThread.access$1500(ActivityThread.java:132)
E/AndroidRuntime( 2912):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
E/AndroidRuntime( 2912):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2912):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2912):    at 
android.app.ActivityThread.main(ActivityThread.java:4575)
E/AndroidRuntime( 2912):    at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime( 2912):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 2912):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
E/AndroidRuntime( 2912):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
E/AndroidRuntime( 2912):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2912): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 2912):    at 
com.googlecode.gtalksms.receivers.PublicIntentReceiver.onReceive(PublicIntentRec
eiver.java:69)
E/AndroidRuntime( 2912):    at 
android.app.ActivityThread.handleReceiver(ActivityThread.java:2242)
E/AndroidRuntime( 2912):    ... 10 more

And btw the beta version looks and feels great!

Original comment by samuel.t...@gmail.com on 17 Jun 2012 at 6:18

GoogleCodeExporter commented 8 years ago
Do you have enabled Public Intents feature in settings ?
I've fixed this NPE in a recent changeset 
(http://code.google.com/p/gtalksms/source/detail?r=aa53d85ca0a49870acf3acf736752
097b2750c7b).

I'll mark this issue as fixed until the next release (before the end of the 
month).

Please reopen if you still have this issue in the next release.

Original comment by Florent....@gmail.com on 19 Jun 2012 at 9:17

GoogleCodeExporter commented 8 years ago
Yup, public intents are enabled in settings.

Original comment by samuel.t...@gmail.com on 19 Jun 2012 at 9:31

GoogleCodeExporter commented 8 years ago
Fixed with GTalkSMS v4.0 and released on market

Original comment by Florent....@gmail.com on 28 Jul 2012 at 4:20

GoogleCodeExporter commented 8 years ago
Fixed with GTalkSMS v4.0 and released on market

Original comment by Florent....@gmail.com on 28 Jul 2012 at 4:20