eclipse / paho.mqtt.android

MQTT Android
Other
2.93k stars 885 forks source link

A NPE happened when Mqtt (start?) #276

Open JNYoung opened 6 years ago

JNYoung commented 6 years ago

Please fill out the form below before submitting, thank you!

__Android API Version Bug Seen on:24

__Android Version Bug Seen on:1.2.0

Please also check that if you have found the bug in the Release version (1.1.1) that you check that it also exists in the Snapshot (1.1.2-SNAPSHOT) before raising a bug.

Description of Bug:

E.g. Steps to re-create, how often does this happen etc.. When the app first launched an exception happened

Console Log output (if available):

12-29 13:57:01.418 23639-23639/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.nextev.powerexpress:remote, PID: 23639 java.lang.NullPointerException: Attempt to invoke virtual method 'void org.eclipse.paho.android.service.MqttService.traceError(java.lang.String, java.lang.String)' on a null object reference at org.eclipse.paho.android.service.MqttAndroidClient.simpleAction(MqttAndroidClient.java:1400) at org.eclipse.paho.android.service.MqttAndroidClient.subscribeAction(MqttAndroidClient.java:1422) at org.eclipse.paho.android.service.MqttAndroidClient.onReceive(MqttAndroidClient.java:1284) at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:308) at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46) at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:118) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6268) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:801)

Hemant0601 commented 6 years ago

Is this happening always or just once randomly. You can put it in a debug mode and check what exactly is NULL there.