TeamAmaze / TeamAmaze/AmazeFileManager
NPE when option item selected in apps fragment and recycler adapter is not present
Open
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.6.7
- User Action: UI Error
- Request: Application crash
- OS: Linux Android 10 - 29
- Device: lime
- Model: M2010J19SI
- Product: lime_in
Crash log
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.amaze.filemanager.adapters.AppsRecyclerAdapter.setData(java.util.List, boolean)' on a null object reference
at com.amaze.filemanager.ui.fragments.AppsListFragment.onOptionsItemSelected(AppsListFragment.java:157)
at com.amaze.filemanager.ui.activities.MainActivity.onOptionsItemSelected(MainActivity.java:1083)
at android.app.Activity.onMenuItemSelected(Activity.java:4222)
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.MenuPopup.onItemClick(MenuPopup.java:128)
at android.widget.AdapterView.performItemClick(AdapterView.java:330)
at android.widget.AbsListView.performItemClick(AbsListView.java:1219)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3230)
at android.widget.AbsListView$3.run(AbsListView.java:4186)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:226)
at android.app.ActivityThread.main(ActivityThread.java:7592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Reporter: Jayu9493
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 AppsListFragment.java:157, where the crash log shows option selection calling AppsRecyclerAdapter.setData, and review MainActivity.onOptionsItemSelected as the caller. Reproduce selecting the option when the recycler adapter is absent, then verify the action no longer causes a NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100