libre-tube / LibreTube

An alternative frontend for YouTube, for Android.
https://libretube.dev
GNU General Public License v3.0
8.66k stars 446 forks source link

app force close issue when i try open library #4683

Closed mohamadbij closed 1 year ago

mohamadbij commented 1 year ago

Steps to reproduce

When I try to go to the next few seconds of the video by double tapping, the app closes. (Randomly) But now when I want to open the library, the app will crash and close ( certain) my device is Galaxy TAB S3 with Android 10. This is the error when opening the library:

java.lang.ArrayIndexOutOfBoundsException: length=4; index=-1 at com.github.libretube.ui.fragments.LibraryFragment.onViewCreated(SourceFile:377) at androidx.fragment.app.FragmentStateManager.createView(SourceFile:296) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(SourceFile:144) at androidx.fragment.app.FragmentManager.executeOpsTogether(SourceFile:1429) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(SourceFile:92) at androidx.fragment.app.FragmentManager.execPendingActions(SourceFile:74) at androidx.fragment.app.DialogFragment$1.run(SourceFile:22) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:216) at android.app.ActivityThread.main(ActivityThread.java:7266) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

Expected behavior

This should open the library

Actual behavior

The app crashes and closes

LibreTube version

0.17.1

Android version

10

Other details

No response

Acknowledgements

akano12 commented 1 year ago

Issue is literally pinned and it's the first thing you'll see before opening an issue mate

https://github.com/libre-tube/LibreTube/issues/4491