StringIndexOutOfBoundsException
on HybridFile#getParent
#3936
Labels
From-telegram
Issue reported through telegram channel
Issue-Bug
Related unexpected behavior or something worth investigating.
Issue-Easy (good first issue)
Beginners welcome! Issues with relative low difficulty.
Milestone
Issue explanation (write below this line)
Exception
Crash log
`
java.lang.StringIndexOutOfBoundsException: begin 0, end -2, length 5
at java.lang.String.checkBoundsBeginEnd(String.java:3942)
at java.lang.String.substring(String.java:2467)
at com.amaze.filemanager.filesystem.HybridFile.getParent(HybridFile.java:572)
at com.amaze.filemanager.ui.fragments.MainFragment.goBack(MainFragment.java:1090)
at com.amaze.filemanager.ui.activities.MainActivity.lambda$onBackPressed$6(MainActivity.java:909)
at com.amaze.filemanager.ui.activities.MainActivity.$r8$lambda$fKbQXJTjmE3tEXFhvzq2Q8y2c_E(Unknown Source:0)
at com.amaze.filemanager.ui.activities.MainActivity$$ExternalSyntheticLambda6.apply(Unknown Source:2)
at com.amaze.filemanager.ui.activities.MainActivity.executeWithMainFragment(MainActivity.java:2518)
at com.amaze.filemanager.ui.activities.MainActivity.executeWithMainFragment(MainActivity.java:2510)
at com.amaze.filemanager.ui.activities.MainActivity.onBackPressed(MainActivity.java:907)
at android.app.Activity.onKeyUp(Activity.java:4017)
at android.view.KeyEvent.dispatch(KeyEvent.java:2931)
at android.app.Activity.dispatchKeyEvent(Activity.java:4368)
at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.java:122)
at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:84)
at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.java:140)
at androidx.appcompat.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:599)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:3090)
at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:425)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:6866)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6714)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6149)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6206)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6172)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6337)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6180)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6394)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6153)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6206)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6172)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6180)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6153)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6206)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6172)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6370)
at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:6567)
at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3692)
at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:3200)
at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:3191)
at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3669)
Reporter: magidgawad
The text was updated successfully, but these errors were encountered: