zoriya / Opus

Android app for playing music from local file or from youtube.
https://www.raccoon-sdg.fr/en
GNU General Public License v3.0
8 stars 2 forks source link

App crashed when l clicked on the shuffle icon in the youtube playlist. #28

Open cckole opened 5 years ago

cckole commented 5 years ago

Descriptions

After adding my YouTube playlist to the app as appropriate, I discovered it was added successfully. I then clicked on it to play a song, after which I clicked on shuffle icon. It was when I clicked on the shuffle that the app crashed. So in short, app crashed when I clicked on the shuffle icon in the YouTube playlist.

Steps to reproduce

Launch the app

Expected behavior

When I clicked on the shuffle icon, I expected the songs in the playlist to be shuffled and play randomly as the feature is designed in the app. If the shuffle icon is clicked anywhere in the app, it fetches and play another song after which songs plays at random. That was exactly what I expected it to do in the YouTube playlist.

Reproducing the bug

2019_06_27_13_40_20

Device used

Tekno spark k7

Android 7.0

App version 3.4.2

Logcat


07-05 09:28:41.154 22919 22919 E AndroidRuntime: Process: com.sdg.opus, PID: 22919
07-05 09:28:41.154 22919 22919 E AndroidRuntime: android.runtime.JavaProxyThrowable: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
07-05 09:28:41.154 22919 22919 E AndroidRuntime: Parameter name: index
07-05 09:28:41.154 22919 22919 E AndroidRuntime:   at System.Collections.Generic.List`1[T].RemoveAt (System.Int32 index) [0x00009] in <30b38a2efd1f4f0c8d25a002ce490554>:0 
07-05 09:28:41.154 22919 22919 E AndroidRuntime:   at Opus.Api.PlaylistManager.Shuffle (System.String YoutubeID) [0x000d2] in <8724d86c569744239242f51546aeb685>:0 
07-05 09:28:41.154 22919 22919 E AndroidRuntime:   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <30b38a2efd1f4f0c8d25a002ce490554>:0 
07-05 09:28:41.154 22919 22919 E AndroidRuntime:   at Android.App.SyncContext+<>c_DisplayClass2_0.<Post>b_0 () [0x00000] in <4e1cb06cabca41f5a7511b39bdc8b640>:0 
07-05 09:28:41.154 22919 22919 E AndroidRuntime:   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <4e1cb06cabca41f5a7511b39bdc8b640>:0 
07-05 09:28:41.154 22919 22919 E AndroidRuntime:   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <4e1cb06cabca41f5a7511b39bdc8b640>:0 
07-05 09:28:41.154 22919 22919 E AndroidRuntime:   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.83(intptr,intptr)
07-05 09:28:41.154 22919 22919 E AndroidRuntime:    at mono.java.lang.RunnableImplementor.n_run(Native Method)
07-05 09:28:41.154 22919 22919 E AndroidRuntime:    at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:1)
07-05 09:28:41.154 22919 22919 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:836)
07-05 09:28:41.154 22919 22919 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:103)
07-05 09:28:41.154 22919 22919 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:203)
07-05 09:28:41.154 22919 22919 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6251)
07-05 09:28:41.154 22919 22919 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
07-05 09:28:41.154 22919 22919 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
07-05 09:28:41.154 22919 22919 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)```
zoriya commented 5 years ago

I can't reproduce the bug myself, I will need a logcat for this.

Thanks for your feedback!

cckole commented 5 years ago

@anonymusRacoon, I've added the logcat you requested. Thanks.

zoriya commented 5 years ago

Ok, I figured why the app crashed. It's because I used a random track position to start playback and in order to speed up the process I used a random number before knowing the size of the playlist and forgot to check after that the playlist needed to be larger than my position. Oups.

Will be fixed in a few hours.

cckole commented 5 years ago

That's great. WELL DONE.

zoriya commented 5 years ago

That's done, you can download the update right now.

cckole commented 5 years ago

I WILL CHECK IT OUT NOW AND FEED YOU BACK