Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfBoundsException on NetCopyConnectionInfo.#init #4148

Open
amaze-issue-automation bot opened this issue Apr 8, 2024 · 1 comment
Open

IndexOutOfBoundsException on NetCopyConnectionInfo.#init #4148

amaze-issue-automation bot opened this issue Apr 8, 2024 · 1 comment
Labels
Area-SMB Related to SMB connections. From-Email This is from an email, probably lacking replication info Issue-Bug Related unexpected behavior or something worth investigating.

Comments

@amaze-issue-automation
Copy link

Issue explanation (write below this line)

trying to copy an image fromage smb nas serveur to local storage. bug when asking to paste.

Exception

  • App Name: Gestionnaire de fichiers Amaze
  • Package: com.amaze.filemanager
  • Version: 3.10
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 13 - 33
  • Device: OP52F3L1
  • Model: CPH2339
  • Product: CPH2339EEA
Crash log

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
	at java.util.Collections$SingletonList.get(Collections.java:5042)
	at com.amaze.filemanager.filesystem.ftp.NetCopyConnectionInfo.<init>(NetCopyConnectionInfo.kt:118)
	at com.amaze.filemanager.utils.smb.SmbUtil.buildPath(SmbUtil.kt:80)
	at com.amaze.filemanager.utils.smb.SmbUtil.getSmbDecryptedPath(SmbUtil.kt:59)
	at com.amaze.filemanager.utils.smb.SmbUtil.create(SmbUtil.kt:105)
	at com.amaze.filemanager.filesystem.HybridFile.getSmbFile(HybridFile.java:521)
	at com.amaze.filemanager.ui.fragments.MainFragment.goBack(MainFragment.java:1097)
	at com.amaze.filemanager.ui.activities.MainActivity.lambda$onBackPressed$6(MainActivity.java:932)
	at com.amaze.filemanager.ui.activities.MainActivity.$r8$lambda$fKbQXJTjmE3tEXFhvzq2Q8y2c_E(Unknown Source:0)
	at com.amaze.filemanager.ui.activities.MainActivity$$ExternalSyntheticLambda2.apply(Unknown Source:2)
	at com.amaze.filemanager.ui.activities.MainActivity.executeWithMainFragment(MainActivity.java:2553)
	at com.amaze.filemanager.ui.activities.MainActivity.executeWithMainFragment(MainActivity.java:2545)
	at com.amaze.filemanager.ui.activities.MainActivity.onBackPressed(MainActivity.java:930)
	at android.app.Activity.onKeyUp(Activity.java:3920)
	at android.view.KeyEvent.dispatch(KeyEvent.java:2925)
	at android.app.Activity.dispatchKeyEvent(Activity.java:4298)
	at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.java:126)
	at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:86)
	at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.java:144)
	at androidx.appcompat.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:604)
	at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:60)
	at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:3413)
	at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:444)
	at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:6821)
	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6682)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6133)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6195)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6156)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6330)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6164)
	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6387)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6137)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6195)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6156)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6164)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6137)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6195)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6156)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6363)
	at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:6543)
	at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3778)
	at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:3291)
	at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:3282)
	at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3755)
	at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154)
	at android.os.MessageQueue.nativePollOnce(Native Method)
	at android.os.MessageQueue.next(MessageQueue.java:339)
	at android.os.Looper.loopOnce(Looper.java:186)
	at android.os.Looper.loop(Looper.java:351)
	at android.app.ActivityThread.main(ActivityThread.java:8377)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)


̴ı ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡| ̲▫̲͡ π ̲̲͡▫ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l._

@amaze-issue-automation amaze-issue-automation bot added the From-Email This is from an email, probably lacking replication info label Apr 8, 2024
@VishnuSanal VishnuSanal changed the title Crash reported by F. IndexOutOfBoundsException on NetCopyConnectionInfo.#init Apr 15, 2024
@VishnuSanal VishnuSanal added Issue-Bug Related unexpected behavior or something worth investigating. Area-SMB Related to SMB connections. labels Apr 15, 2024
@Tey
Copy link

Tey commented Oct 12, 2024

I have the same problem with one of my samba share that requires a username but no password. It always happens when copying files to a subfolder of that network share, but not when copying files to the share root. It also happens when trying to create a new file/folder in a share subfolder.
It does not seem to happen with my other shares (but they use different credentials).

Most likely, the split here returns a list of a single element, so accessing pair[1] crashes. You probably want to use pair.elementAtOrElse(1, "") instead.
That code appeared in #3661.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-SMB Related to SMB connections. From-Email This is from an email, probably lacking replication info Issue-Bug Related unexpected behavior or something worth investigating.
Projects
None yet
Development

No branches or pull requests

2 participants