TeamAmaze / TeamAmaze/AmazeFileManager
NPE on `MainFragment#onSearchCompleted`: null `mainFragmentViewModel`
Open
Nobody has claimed this yet.
Crash-NullPointerException
From-Email
Issue-Bug
Issue-Easy (good first issue)
- 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
- Package: com.amaze.filemanager
- Version: 3.7.2
- User Action: UI Error
- Request: Application crash
- OS: Linux Android 8.0.0 - 26
- Device: herolte
- Model: SM-G930F
- Product: heroltexx
Crash log
java.lang.NullPointerException: Attempt to invoke virtual method
'java.util.ArrayList
com.amaze.filemanager.ui.fragments.data.MainFragmentViewModel.getListElements()'
on a null object reference
at
com.amaze.filemanager.ui.fragments.MainFragment.onSearchCompleted(MainFragment.java:1427)
at
com.amaze.filemanager.ui.activities.MainActivity.onPostExecute(MainActivity.java:2098)
at
com.amaze.filemanager.asynchronous.asynctasks.searchfilesystem.SearchAsyncTask.onPostExecute(SearchAsyncTask.java:108)
at
com.amaze.filemanager.asynchronous.asynctasks.searchfilesystem.SearchAsyncTask.onPostExecute(SearchAsyncTask.java:41)
at android.os.AsyncTask.finish(AsyncTask.java:695)
at android.os.AsyncTask.-wrap1(Unknown Source:0)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
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 by reading MainFragment.java at line 1427, then trace the callback through MainActivity.java:2098 and SearchAsyncTask.java:108. Reproduce the search action on the reported Android configuration if possible; done means the callback no longer crashes when mainFragmentViewModel is null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100