TeamAmaze / TeamAmaze/AmazeFileManager

NPE on `DatabaseViewerActivity#onPrepareOptionsMenu`

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

Nobody has claimed this yet.

Crash-NullPointerException From-telegram 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)

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.