Closed neupanedipen closed 6 years ago
Replicated the issue on Android 7.0
05-20 11:01:11.441 16103-16103/org.broeuschmeul.android.gps.usb.provider E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.broeuschmeul.android.gps.usb.provider, PID: 16103
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.broeuschmeul.android.gps.usb.provider/org.broeuschmeul.android.gps.usb.provider.ui.SettingsActivity}: java.lang.IllegalStateException: ListPreference requires an entries array and an entryValues array.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4483)
at android.app.ActivityThread.-wrap19(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1466)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
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:1819)
at android.preference.PreferenceGroup.dispatchRestoreInstanceState(PreferenceGroup.java:325)
at android.preference.Preference.restoreHierarchyState(Preference.java:1801)
at android.preference.PreferenceFragment.onActivityCreated(PreferenceFragment.java:218)
at android.app.Fragment.performActivityCreated(Fragment.java:2362)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1014)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1153)
at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2039)
at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:176)
at android.app.Activity.performCreateCommon(Activity.java:6656)
at android.app.Activity.performCreate(Activity.java:6664)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4483)
at android.app.ActivityThread.-wrap19(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1466)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Interesting find! I had trouble replicating this, as it doesn't show up on the debug version of the APK. Thanks for the stacktrace, will look into fixing.
Expected behavior
The app must be stable during screen rotation on "Choose Usb Gps" page.
Actual behavior
But the app crashes on rotating the screen on "Choose Usb Gps" page.
How to reproduce
The app crashes.
Recording Of The Bug
https://youtu.be/hfTSZ-87SCo