The application crashes and cannot be used again when playing music files that have been deleted
Project Information
- Repository : Bop - Music Player
- Title : Bop - Music Player
- Publisher : Emicla Developers (Sahdeep Singh)
Expected behavior
Supposedly, when I play deleted music files there will be no crashes. And it should, when a user plays a deleted file, a short message will appear like "File not found".
Actual behavior
When I tried playing one of the music in the application, I accidentally deleted the music that I played in the file manager. Then I returned to the album page and played another music. And I see the music files that I have deleted are still available on the Album page. Then I tried clicking the music file that I deleted earlier. Suddenly the application crashes and exits by itself. Then I tried to reopen the application but it couldn't and the crash continued. So I have to restart the application.
How to reproduce
Steps to reproduce the behavior:
- Install and open the application
- Then go to the album page and play one of the music
- Next, enter the file manager page and delete the music you are playing
- Then go back to the application and enter the album page again, then you will see the deleted file still exists and is still playing.
- Then play another song, and then click on the music file that you deleted earlier.
- then the error will be seen
Environment
Tested on 2 devices:
Device | Android Version |
---|
VIVO Y81 | Oreo 8.1.0 (CPU: Octa-core Max 2.0 GHz, RAM: 3 GB) |
Realmi U1 | Oreo 8.1.0 (Octa-core (4x2.1 GHz Cortex-A73 & 4x2.0 GHz Cortex-A53, RAM: 4 GB) |
Application version: v1.2
Recording Of The Bug
Logcat
--------- beginning of crash
03-23 21:46:18.147 7424 7424 E AndroidRuntime: FATAL EXCEPTION: main
03-23 21:46:18.147 7424 7424 E AndroidRuntime: Process: com.sahdeepsingh.Bop, PID: 7424
03-23 21:46:18.147 7424 7424 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.sahdeepsingh.Bop.c.c.b()' on a null object reference
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at com.sahdeepsingh.Bop.g.b.a(Unknown Source:6)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at com.sahdeepsingh.Bop.services.ServicePlayMusic.w(Unknown Source:15)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at com.sahdeepsingh.Bop.services.ServicePlayMusic.h(Unknown Source:79)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at com.sahdeepsingh.Bop.a.c$1.onClick(Unknown Source:13)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at android.view.View.performClick(View.java:6325)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:25098)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:790)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at android.os.Looper.loop(Looper.java:192)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6779)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:445)
03-23 21:46:18.147 7424 7424 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:867)
03-23 21:46:18.154 1432 1943 D SLService: ppCra : com.sahdeepsingh.Bop pid : 7424
Hi @ahyar92, thanks for making this contribution.
I was able to reproduce the crash following the steps you provided. Although I find it strange that you should delete a song from the file manager while it's still playing.
Your actual behavior should have been described with fewer lines of text. The bulkier the essay, the more difficult it is to keep up. Always keep your texts short and precise when possible.
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Chat with us on Discord.
[utopian-moderator]
Thank you for your review, @fego! Keep up the good work!
mantap bang,,terus berkarya,mohon bantuan nya??
Posted using Partiko Android
Hi @ahyar92!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Hey, @ahyar92!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!