TeamAmaze / TeamAmaze/AmazeFileManager
NPE on starting TextEditorActivity: null String in EditableFileAbstraction
Open
Nobody has claimed this yet.
Area-TextEditor
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
- User Action: UI Error
- Request: Application crash
- Version: 3.5.3
- OS: Linux Android 10 - 29
- Device: beryllium
- Model: POCO F1
- Product: beryllium
Crash log
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.amaze.filemanager/com.amaze.filemanager.ui.activities.TextEditorActivity}:
java.lang.NullPointerException: Attempt to invoke virtual method 'int
java.lang.String.hashCode()' on a null object reference
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3308)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3457)
at
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
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)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method
'int java.lang.String.hashCode()' on a null object reference
at
com.amaze.filemanager.filesystem.EditableFileAbstraction.<init>(EditableFileAbstraction.java:54)
at
com.amaze.filemanager.ui.activities.TextEditorActivity.onCreate(TextEditorActivity.java:147)
at android.app.Activity.performCreate(Activity.java:7893)
at android.app.Activity.performCreate(Activity.java:7880)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3283)
... 11 more
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 EditableFileAbstraction.java at line 54 and TextEditorActivity.java at line 147, where the crash occurs while launching the activity. Reproduce the failure on the reported Android 10 setup if possible, then trace which String is null and verify that TextEditorActivity starts without 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
- 35/100