TeamAmaze / TeamAmaze/AmazeFileManager

Index outofbound when trying to find filename for compressed file

Open
#3,155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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)

Syncthing folder open into Amaze.

Exception

  • App Name: Amaze File Manager
  • Package: com.amaze.filemanager
  • Version: 3.6.7
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 11 - 30
  • Device: OnePlus6
  • Model: ONEPLUS A6003
  • Product: OnePlus6
Crash log

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:2064)
at
com.amaze.filemanager.ui.fragments.CompressedExplorerFragment.prepareCompressedFile(CompressedExplorerFragment.kt:290)
at
com.amaze.filemanager.ui.fragments.CompressedExplorerFragment.onViewCreated(CompressedExplorerFragment.kt:184)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:2974)
at
androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:543)
at
androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
at
androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2177)
at
androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2088)
at
androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1990)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8068)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)


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 in ui/fragments/CompressedExplorerFragment.kt at prepareCompressedFile on line 290, following the call from onViewCreated on line 184. Reproduce the crash by opening a Syncthing folder in Amaze and inspect the filename handling. Done means opening the affected compressed file no longer raises StringIndexOutOfBoundsException.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.