TeamAmaze / TeamAmaze/AmazeFileManager
`StringIndexOutOfBoundsException` on `FileUtils#fromContentUri`
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 6.4k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
Issue explanation (write below this line)
Exception
- App Name: Amaze Dosya Yöneticisi
- Package: com.amaze.filemanager
- Version: 3.10
- User Action: UI Error
- Request: Application crash
- OS: Linux Android 13 - 33
- Device: merlinx
- Model: Pixel XL
- Product: lineage_merlinx
Crash log
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.amaze.filemanager/com.amaze.filemanager.ui.activities.MainActivity}: java.lang.StringIndexOutOfBoundsException: length=9; index=13
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:138)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7924)
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:936)
Caused by: java.lang.StringIndexOutOfBoundsException: length=9; index=13
at java.lang.String.substring(String.java:2429)
at com.amaze.filemanager.filesystem.files.FileUtils.fromContentUri(FileUtils.java:1018)
at com.amaze.filemanager.ui.activities.MainActivity.checkForExternalIntent(MainActivity.java:617)
at com.amaze.filemanager.ui.activities.MainActivity.onCreate(MainActivity.java:395)
at android.app.Activity.performCreate(Activity.java:8342)
at android.app.Activity.performCreate(Activity.java:8321)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
... 12 more
Reporter: Yufusi1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in com.amaze.filemanager.filesystem.files.FileUtils#fromContentUri at FileUtils.java:1018 and trace how it is called by MainActivity.checkForExternalIntent at MainActivity.java:617. Reproduce the reported launch crash on Android 13 with the relevant external intent, then verify that the activity starts without StringIndexOutOfBoundsException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100