TeamAmaze / TeamAmaze/AmazeFileManager
`NullPointerException: USB OTG root not set!` on `OTGUtil#getDocumentFile`
Open
Nobody has claimed this yet.
Crash-NullPointerException
From-Email
- 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 File Manager
- Package: com.amaze.filemanager
- Version: 3.8.5
- User Action: UI Error
- Request: Application crash
- OS: Linux Android 5.1 - 22
- Device: TB3-710I
- Model: Lenovo TB3-710I
- Product: LenovoTB3-710I
Crash log
java.lang.NullPointerException: USB OTG root not set!
at com.amaze.filemanager.utils.OTGUtil.getDocumentFile(OTGUtil.kt:157)
at com.amaze.filemanager.filesystem.HybridFile.getTotal(HybridFile.java:922)
at
com.amaze.filemanager.ui.views.drawer.Drawer.refreshDrawer(Drawer.java:308)
at
com.amaze.filemanager.ui.activities.MainActivity$1.onComplete(MainActivity.java:428)
at
io.reactivex.internal.operators.completable.CompletableObserveOn$ObserveOnCompletableObserver.run(CompletableObserveOn.java:89)
at
io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5637)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
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 at OTGUtil.kt:157, then trace the call from HybridFile.java:922 through Drawer.java:308 and MainActivity.java:428. Reproduce the reported UI action on Android 5.1 and determine why the USB OTG root is unset; done means the drawer refresh no longer crashes with this NullPointerException.
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
- 38/100