TeamAmaze / TeamAmaze/AmazeFileManager
NPE on `GlideApp#with`
Open
Nobody has claimed this yet.
Crash-NullPointerException
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)
Exception
- App Name: Amaze
- Package: com.amaze.filemanager
- Version: 3.8.2
- User Action: UI Error
- Request: Application crash
- OS: Linux Android 11 - 30
- Device: whyred
- Model: Redmi Note 5
- Product: lineage_whyred
Crash log
java.lang.NullPointerException: You cannot start a load on a not yet attached View or a Fragment where getActivity() returns null (which usually occurs when getActivity() is called before the Fragment is attached or after the Fragment is destroyed).
at com.bumptech.glide.util.Preconditions.checkNotNull(Preconditions.java:29)
at com.bumptech.glide.Glide.getRetriever(Glide.java:744)
at com.bumptech.glide.Glide.with(Glide.java:813)
at com.amaze.filemanager.GlideApp.with(GlideApp.java:110)
at com.amaze.filemanager.adapters.RecyclerAdapter$1.lambda$onLoadFailed$0(RecyclerAdapter.java:1268)
at com.amaze.filemanager.adapters.RecyclerAdapter$1.$r8$lambda$0RPp15KcLgKkfDucgxd_0n-BOX8(Unknown Source:0)
at com.amaze.filemanager.adapters.RecyclerAdapter$1$$ExternalSyntheticLambda0.handleMessage(Unknown Source:4)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Enviado do Yahoo Mail no Android
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 RecyclerAdapter$1.onLoadFailed in RecyclerAdapter.java around line 1268 and the GlideApp.with call shown in the crash log. Trace the view or fragment lifecycle at that point and verify that the failed-load path no longer produces the reported NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100