Description
I noticed that whenever I launch the app at intervals, it first crashes before working well. Assuming I used it to play songs now and exit. If after some time(20 to 30 minutes) I launch it, it first crashes and work fine when I re-launch it the second time.
Expected behaviour
I expected the app to work fine at first launching irrespective of the visiting interval. It shouldn't crash because I'm launching it after exiting for a while.
Steps to reproduce
After downloading and installation
Launch the app and use it for some time
Stop using it and leave it for few hours.
Launch it after few hour, and note the crash.
Video showing the behavior
Device used
Techno spark k7
Android 7.0 O.S
App version 2.6.3.6
Logcat
05-24 12:42:48.238 25091 25091 E AndroidRuntime: Process: top.geek_studio.chenlongcould.musicplayer.Common, PID: 25091
05-24 12:42:48.238 25091 25091 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver top.geek_studio.chenlongcould.musicplayer.broadcast.ReceiverOnMusicPlay: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.Handler.sendEmptyMessage(int)' on a null object reference
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3107)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at android.app.ActivityThread.-wrap18(ActivityThread.java)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:110)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at android.os.Looper.loop(Looper.java:203)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6251)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.Handler.sendEmptyMessage(int)' on a null object reference
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at top.geek_studio.chenlongcould.musicplayer.broadcast.ReceiverOnMusicPlay.onReceive(SourceFile:52)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3100)
05-24 12:42:48.238 25091 25091 E AndroidRuntime: ... 8 more```