Githup repo
Expected behavior
I expected the app to rotate to landscape successfully with the dialog without crashing.
Actual behavior
When I click on "Preferred Audioplayer" then rotate the screen to landscape view the app crashes and exit.
How to reproduce
- Download the app from F-droid
- Launch the app
- From the nav drawer, click on "Settings"
- Click on "Preferred Audioplayer"
- Rotate the screen to landscape
- App crashes and exit.
- Version : Version 0.26.5
- Device : Gionee A1 lite
- Operating system : Android 7.0
Recording of the Bug
https://m.youtube.com/watch?v=GBBiZ3TpqEo
Logcat
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2734) ~[na:0.0]
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2799) ~[na:0.0]
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4631) ~[na:0.0]
at android.app.ActivityThread.-wrap19(ActivityThread.java) ~[na:0.0]
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1543) ~[na:0.0]
at android.os.Handler.dispatchMessage(Handler.java:110) ~[na:0.0]
at android.os.Looper.loop(Looper.java:203) ~[na:0.0]
at android.app.ActivityThread.main(ActivityThread.java:6269) ~[na:0.0]
at java.lang.reflect.Method.invoke(Native Method) ~[na:0.0]
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063) ~[na:0.0]
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924) ~[na:0.0]
Caused by: java.lang.IllegalStateException: ListPreference requires an entries array and an entryValues array.
at android.preference.ListPreference.onPrepareDialogBuilder(ListPreference.java:249) ~[na:0.0]
at android.preference.DialogPreference.showDialog(DialogPreference.java:306) ~[na:0.0]
at android.preference.DialogPreference.onRestoreInstanceState(DialogPreference.java:453) ~[na:0.0]
at android.preference.ListPreference.onRestoreInstanceState(ListPreference.java:315) ~[na:0.0]
at android.preference.Preference.dispatchRestoreInstanceState(Preference.java:1851) ~[na:0.0]
at android.preference.PreferenceGroup.dispatchRestoreInstanceState(PreferenceGroup.java:361) ~[na:0.0]
at android.preference.PreferenceGroup.dispatchRestoreInstanceState(PreferenceGroup.java:361) ~[na:0.0]
at android.preference.Preference.restoreHierarchyState(Preference.java:1833) ~[na:0.0]
at android.preference.PreferenceActivity.onRestoreInstanceState(PreferenceActivity.java:1086) ~[na:0.0]
at android.app.Activity.performRestoreInstanceState(Activity.java:1009) ~[na:0.0]
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1174) ~[na:0.0]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2707) ~[na:0.0]
... 10 common frames omitted
05-26 07:27:09.804 24268-24268/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: nodomain.freeyourgadget.gadgetbridge, PID: 24268
java.lang.RuntimeException: Unable to start activity ComponentInfo{nodomain.freeyourgadget.gadgetbridge/nodomain.freeyourgadget.gadgetbridge.activities.SettingsActivity}: java.lang.IllegalStateException: ListPreference requires an entries array and an entryValues array.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2734)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2799)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4631)
at android.app.ActivityThread.-wrap19(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1543)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6269)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: java.lang.IllegalStateException: ListPreference requires an entries array and an entryValues array.
at android.preference.ListPreference.onPrepareDialogBuilder(ListPreference.java:249)
at android.preference.DialogPreference.showDialog(DialogPreference.java:306)
at android.preference.DialogPreference.onRestoreInstanceState(DialogPreference.java:453)
at android.preference.ListPreference.onRestoreInstanceState(ListPreference.java:315)
at android.preference.Preference.dispatchRestoreInstanceState(Preference.java:1851)
at android.preference.PreferenceGroup.dispatchRestoreInstanceState(PreferenceGroup.java:361)
at android.preference.PreferenceGroup.dispatchRestoreInstanceState(PreferenceGroup.java:361)
at android.preference.Preference.restoreHierarchyState(Preference.java:1833)
at android.preference.PreferenceActivity.onRestoreInstanceState(PreferenceActivity.java:1086)
at android.app.Activity.performRestoreInstanceState(Activity.java:1009)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1174)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2799)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4631)
at android.app.ActivityThread.-wrap19(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1543)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6269)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924) ```
Thanks for your contribution.
This issue has already been reported via Utopian, you can find a link to this issue below:
https://steemit.com/utopian-io/@iamsudipbh/app-crashes-when-rotating-the-screen
Here's some advice for your next contribution:
Did you know that we score favourably to users who contact the project owner prior to submitting bug-reports to Utopian? As per our guidelines:
If the contributor made attempts to inform the Project Owner about the bug and confirm the issue, this should be noted in the post as it will be eligible for a higher score and potential reward. Note that said attempts to contact the Project Owner must adhere to Utopian Policies for contributor conduct on GitHub and other external services.
Remember to be considered for reward Utopian contributors must have an active GitHub account associated with their Utopian / Steem account (unless otherwise specified).
You also try putting your logs in code blocks as this will make it easier to read, you can do this by adding the following before an after your post.
```This is a code block```
If you copy and paste my code blocking into your post it will work, simply add the log between the ticks.
Chat with us on Discord.Need help? Write a ticket on https://support.utopian.io.
[utopian-moderator]