My app keeps on crashing on one particular instance when I tried to run the mqttservice in background.
02-18 14:39:38.515 12580-12580/co.haptik.alpha E/AndroidRuntime: FATAL EXCEPTION: main
Process: co.haptik.alpha, PID: 12580
java.lang.RuntimeException: Error receiving broadcast Intent { act=MqttService.pingSender.user@test14909-staging flg=0x14 (has extras) } in org.eclipse.paho.android.service.AlarmPingSender$AlarmReceiver@37178ea7
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:998)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6912)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by: java.lang.RuntimeException: WakeLock under-locked MqttService.client.user@test14909-staging
at android.os.PowerManager$WakeLock.release(PowerManager.java:1642)
at android.os.PowerManager$WakeLock.release(PowerManager.java:1613)
at org.eclipse.paho.android.service.AlarmPingSender$AlarmReceiver.onReceive(AlarmPingSender.java:165)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:988)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6912)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)