TeamAmaze / TeamAmaze/AmazeFileManager

NPE on onProgressUpdate: Null MainFragment

Open
#2,494 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

From-Email 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)

Doing a search in a subfolder. First some results were coming, later it crashed.

Exception

  • User Action: UI Error
  • Request: Application crash
  • Version: 3.5.3
  • OS: Linux Android 9 - 28
  • Device: dreamlte
  • Model: SM-G950F
  • Product: dreamltexx
Crash log

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.amaze.filemanager.ui.fragments.MainFragment.addSearchResult(com.amaze.filemanager.filesystem.HybridFileParcelable, java.lang.String)' on a null object reference
	at com.amaze.filemanager.ui.activities.MainActivity.onProgressUpdate(MainActivity.java:1861)
	at com.amaze.filemanager.asynchronous.asynctasks.SearchAsyncTask.onProgressUpdate(SearchAsyncTask.java:106)
	at com.amaze.filemanager.asynchronous.asynctasks.SearchAsyncTask.onProgressUpdate(SearchAsyncTask.java:35)
	at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:715)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7050)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)


--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

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

Start with MainActivity.java at onProgressUpdate line 1861 and trace how SearchAsyncTask.java reports results during a subfolder search. Reproduce the search scenario on the reported Android version if possible, then verify that results arriving during fragment changes no longer cause the reported NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.