TeamAmaze / TeamAmaze/AmazeFileManager
`ClassCastException` on `ThemedTextView#setTextViewColor`
Open
Nobody has claimed this yet.
From-telegram
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.8.2
- User Action: UI Error
- Request: Application crash
- OS: Linux Android 6.0.1 - 23
- Device: j3popltespr
- Model: SM-J327P
- Product: j3popltespr
Crash log
java.lang.ClassCastException: com.amaze.filemanager.ui.activities.texteditor.TextEditorActivity cannot be cast to com.amaze.filemanager.ui.activities.MainActivity
at com.amaze.filemanager.ui.views.ThemedTextView.setTextViewColor(ThemedTextView.java:50)
at com.amaze.filemanager.ui.dialogs.OpenFileDialogFragment.loadViews(OpenFileDialogFragment.kt:371)
at com.amaze.filemanager.ui.dialogs.OpenFileDialogFragment.onViewCreated(OpenFileDialogFragment.kt:330)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:2987)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:546)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7422)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Reporter: Mahfood22
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 with ThemedTextView.java at line 50, then inspect OpenFileDialogFragment.kt at lines 330 and 371, which appear in the crash stack. Reproduce the UI error by opening the relevant dialog from TextEditorActivity and trace the activity type involved. Done means this flow no longer throws the reported ClassCastException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100