zhanghai / zhanghai/MaterialFiles
Error when opening remote file with apps other than Material Files
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 9k
- Forks
- 736
- PR merge metrics
- No merged PRs in 30d
Description
So I got java.lang.ArrayIndexOutOfBoundsException: src.length=1 srcPos=0 dst.length=256 dstPos=-5 length=1 error when opening remote (SFTP) files with apps other than Material Files
How to reproduce:
- Open Material files.
- Setup remote SFTP file storage if you havent done so.
- Open any file inside the remote storage.
Video: https://github.com/zhanghai/MaterialFiles/assets/169248210/a5b1aff2-db5d-41dd-8b4d-2b23e913373a
If the file is opened with Material Files (eg. Photo viewer, Text editor), it works
But if i open it in apps other than Material Files (in the video below i choose Xed, but it can be any app), it will throw error like i mentioned above
The only way to fix the error is to restart the app (remove it from recent apps, then manually relaunch)
I'm using latest version 1.7.2 arm64 from play store
Contributor guide
No contributing guide indexed for this repository
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 by reproducing the issue with the listed SFTP steps and trace how Material Files opens a remote file in an external app. Compare that path with opening the same file in Material Files; done means external apps can open remote files without the reported exception and internal viewers continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100