zhanghai / zhanghai/MaterialFiles
Attempting to change language causes crash
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 9k
- Forks
- 736
- PR merge metrics
- No merged PRs in 30d
Description
Device: Redmi Note 10 Pro
Android: 13
Material Files: v1.6.0 (F-Droid)
Steps to reproduce:
- Open navigation drawer
- Go to Settings
- Tap on Language
- The app either returns home or causes a crash.
The log generated by the system is attached below:
Crash log
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.localepicker.AppLocalePickerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3834)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3980)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
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:2394)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at android.app.ActivityThread.main(ActivityThread.java:8296)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
at com.android.settings.localepicker.AppLocalePickerActivity.onCreate(AppLocalePickerActivity.java:75)
at android.app.Activity.performCreate(Activity.java:8523)
at android.app.Activity.performCreate(Activity.java:8487)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1438)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3815)
... 12 more
Contributor guide
No contributing guide indexed for this repository
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 reproducing the Settings > Language entry point on Android 13 and trace how the app launches the locale picker. Use the attached AppLocalePickerActivity crash log to identify the failing path. Done means opening Language no longer returns home or crashes.
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
- Mostly clear
- Newbie friendliness
- 45/100