TeamAmaze / TeamAmaze/AmazeFileManager
NPE on `DatabaseViewerActivity#onPrepareOptionsMenu`
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 File Manager
- Package: com.amaze.filemanager
- Version: 3.7.0
- User Action: UI Error
- Request: Application crash
- OS: Linux Android 5.1 - 22
- Device: A37
- Model: OPPO A37m
- Product: A37m
Crash log
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getName()' on a null object reference
at com.amaze.filemanager.ui.activities.DatabaseViewerActivity.onPrepareOptionsMenu(DatabaseViewerActivity.java:161)
at android.app.Activity.onPreparePanel(Activity.java:2964)
at androidx.fragment.app.FragmentActivity.onPrepareOptionsPanel(FragmentActivity.java:485)
at androidx.fragment.app.FragmentActivity.onPreparePanel(FragmentActivity.java:470)
at androidx.appcompat.view.WindowCallbackWrapper.onPreparePanel(WindowCallbackWrapper.java:99)
at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onPreparePanel(AppCompatDelegateImpl.java:3111)
at androidx.appcompat.view.WindowCallbackWrapper.onPreparePanel(WindowCallbackWrapper.java:99)
at androidx.appcompat.app.ToolbarActionBar$ToolbarCallbackWrapper.onPreparePanel(ToolbarActionBar.java:523)
at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:457)
at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:57)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:5911)
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:1113)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:879)
Reporter: SuzyRazali
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
Inspect DatabaseViewerActivity.onPrepareOptionsMenu at line 161, starting with the null File reported by the stack trace. Reproduce the menu-preparation flow on the affected Android configuration and verify that opening the database viewer no longer crashes when the menu is prepared.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100