TeamAmaze / TeamAmaze/AmazeFileManager
NPE on selecting options menu item in MainActivity
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.6.1
- User Action: UI Error
- Request: Application crash
- OS: Linux samsung/p3qsqw/p3q:11/RP1A.200720.012/G998USQU4AUF5:user/release-keys 11 - 30
- Device: p3q
- Model: SM-G998U
- Product: p3qsqw
Crash log
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean androidx.fragment.app.Fragment.onOptionsItemSelected(android.view.MenuItem)' on a null object reference
at com.amaze.filemanager.ui.activities.MainActivity.onOptionsItemSelected(MainActivity.java:1065)
at android.app.Activity.onMenuItemSelected(Activity.java:4326)
at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:340)
at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:228)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:65)
at androidx.appcompat.widget.Toolbar$1.onMenuItemClick(Toolbar.java:207)
at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:779)
at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:834)
at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:985)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:975)
at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:623)
at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:151)
at android.view.View.performClick(View.java:8160)
at android.widget.TextView.performClick(TextView.java:16222)
at android.view.View.performClickInternal(View.java:8137)
at android.view.View.access$3700(View.java:888)
at android.view.View$PerformClick.run(View.java:30236)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8512)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Reporter: None
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 MainActivity.java at line 1065 and reproduce selecting an options-menu item on the affected screen. Trace which fragment is expected there and verify that selecting the menu item no longer crashes with a NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100