TeamAmaze / AmazeFileManager

Material design file manager for Android
https://teamamaze.xyz
GNU General Public License v3.0
5.32k stars 1.58k forks source link

`StringIndexOutOfBoundsException` on `HybridFile#getParent` #3019

Open amaze-issue-automation[bot] opened 2 years ago

amaze-issue-automation[bot] commented 2 years ago

Issue explanation (write below this line)

Exception

java.lang.StringIndexOutOfBoundsException: String index out of range: -5
at java.lang.String.substring(String.java:2064)
at
com.amaze.filemanager.filesystem.HybridFile.getParent(HybridFile.java:455)
at
com.amaze.filemanager.ui.fragments.MainFragment.goBack(MainFragment.java:1082)
at
com.amaze.filemanager.ui.activities.MainActivity.lambda$onBackPressed$6(MainActivity.java:859)
at
com.amaze.filemanager.ui.activities.-$$Lambda$MainActivity$fKbQXJTjmE3tEXFhvzq2Q8y2c_E.apply(Unknown
Source:2)
at
com.amaze.filemanager.ui.activities.MainActivity.executeWithMainFragment(MainActivity.java:2373)
at
com.amaze.filemanager.ui.activities.MainActivity.executeWithMainFragment(MainActivity.java:2365)
at
com.amaze.filemanager.ui.activities.MainActivity.onBackPressed(MainActivity.java:857)
at android.app.Activity.onKeyUp(Activity.java:3836)
at android.view.KeyEvent.dispatch(KeyEvent.java:2878)
at android.app.Activity.dispatchKeyEvent(Activity.java:4161)
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:569)
at
androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at
androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:3054)
at
androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at
com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:404)
at
android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:6275)
at
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6141)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5623)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5680)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5646)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5811)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5654)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5868)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5627)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5680)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5646)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5654)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5627)
at
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5680)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5646)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5844)
at
android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:6002)
at
android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3158)
at
android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:2722)
at
android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:2713)
at
android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3135)
at
android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:161)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7838)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)


Saikat-Kar commented 2 years ago

I am new in open source and eagerly want to contribute. So please can I fix this issue.

VishalNehra commented 2 years ago

How do you plan to fix this issue?

Saikat-Kar commented 2 years ago

Can you please guide me, acctually i am very new in open source. But i want to contribute.

EmmanuelMess commented 2 years ago

Can you please guide me, acctually i am very new in open source. But i want to contribute.

How much experience do you have on Android?

Saikat-Kar commented 2 years ago

I just started learning Android a month ago. But i know java well. And want to contribute in android to get real life project experience and to help open source community.

Saikat-Kar commented 2 years ago

Sir, please could you guide me.

VishalNehra commented 2 years ago

@Saikat-Kar don't work on this. Either pick #2453 or #1063 Let me know which one you pick, I'll brief you about it.

Saikat-Kar commented 2 years ago

@VishalNehra sir can I pick #2453 this one.

VishalNehra commented 2 years ago

@Saikat-Kar great. Join our telegram group at https://t.me/AmazeFileManager in case you have any doubts it'll be faster to communicate there.

SIVAH-AKASH commented 2 years ago

This crash happened on my device. Please let me know if I can provide more information to fix this issue.