Project Information
Repository : https://github.com/beenotung/music-player
Title App : Music Player
Publisher App : Beeno Tung
Expected behavior
Supposedly, When first opening the app and pressing "Icon Next" the application does not Crash.
Actual behavior
Initially I accidentally pressed the icon, suddenly directly causing the application to crash. But I try to repeat again to make sure, it turns out the error is really pure technical, the application still crashes.
The first time you open the app and press the "Next Icons" application instantly Crash.
How to reproduce
- Instal App here
- Run the app and immediately click "next icon", Application will crash.
Environment
Device : Redmi Note 5A
System Operating : 7.1.0 Nougat
App Version : 1.3.0
Recording Of The Issues
Logcat
As proof that the application does occur crash
05-29 00:34:33.551 16842 16842 E AndroidRuntime: FATAL EXCEPTION: main
05-29 00:34:33.551 16842 16842 E AndroidRuntime: Process: com.github.beenotung.musicplayer, PID: 16842
05-29 00:34:33.551 16842 16842 E AndroidRuntime: java.lang.IllegalArgumentException: n must be positive
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at java.util.Random.nextInt(Random.java:391)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at com.github.beenotung.musicplayer.MainActivity$PlayerContainer.next_song(MainActivity.java:947)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at com.github.beenotung.musicplayer.MainActivity$PlayerContainer$3.onClick(MainActivity.java:779)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at android.view.View.performClick(View.java:5647)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:22462)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:754)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at android.os.Looper.loop(Looper.java:163)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6361)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
05-29 00:34:33.551 16842 16842 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)