TeamAmaze / TeamAmaze/AmazeFileManager

`IndexOutOfBoundsException` on `NetCopyConnectionInfo.#init`

Open
#4,148 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-SMB From-Email Issue-Bug
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

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._

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with NetCopyConnectionInfo.kt at line 118, then trace the callers in SmbUtil.kt at buildPath, getSmbDecryptedPath, and create. Reproduce the SMB NAS-to-local copy flow on the reported Android setup and inspect the path data reaching the constructor. Done means the copy and related navigation no longer crash with IndexOutOfBoundsException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.