Crash if you open Settings > Theme or Anti-Features selector and change device orientation
- Device OS and version: Android 8.0.0 (security patch level Feb. 1, 2019)
- Device model/manufacturer:
- Motorola Moto E5 Play
- Version: PVTA
- SKU: XT1921-7
- Motorola Moto E5 Play
- F-Droid version (in the About screen): 1.6.2
- F-Droid privileged extension version (if installed): N/A
Also, see Logcat below.
Note: I also tested this bug on Motorola Moto E4 but it died before I wrote down any device info.
What did you do? (clear steps if possible)
Summary
Changed orientation from landscape to portrait while Settings > Theme selector is open.
Reproduction steps
- Make sure orientation is not locked (you can tilt the device and it changes between landscape and portrait orientation).
- Open F-Droid
- Click "Settings" tab
- Scroll down to "Display" section and click on "Theme"
- With the theme selector open (you can see choices like "Light", "Dark", "Night") tilt the device to change the orientation. If device did not crash yet, tilt it back to change orientation back.
Note: F-Droid seems to crash during change from landscape to portrait.
Video
F-Droid_-_Crash_if_chabged_orientation_while_Theme_selector_is_open
What did you expect to see?
App does not crash and just goes from landscape to portrait orientation (or vise verso?).
What did you see instead?
App crashed.
Logcat
PRODUCT=rjames_po_vzw_f
AVAILABLE_MEM_SIZE=6953922560
PHONE_MODEL=moto e5 play
TOTAL_MEM_SIZE=11488178176
STACK_TRACE=java.lang.IllegalStateException: Failure saving state: ListPreferenceDialogFragment{1e36af9 #2 android.support.v14.preference.PreferenceFragment.DIALOG} has target not in fragment manager: PreferencesFragment{c468a2c}
at android.app.FragmentManagerImpl.saveAllState(FragmentManager.java:2725)
at android.app.FragmentController.saveAllState(FragmentController.java:112)
at android.app.Activity.onSaveInstanceState(Activity.java:1578)
at android.support.v4.app.SupportActivity.onSaveInstanceState(SupportActivity.java:74)
at android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:564)
at android.support.v7.app.AppCompatActivity.onSaveInstanceState(AppCompatActivity.java:509)
at org.fdroid.fdroid.views.main.MainActivity.onSaveInstanceState(MainActivity.java:195)
at android.app.Activity.performSaveInstanceState(Activity.java:1505)
at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1407)
at android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:4962)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4913)
at android.app.ActivityThread.-wrap18(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1707)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6797)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:772)
PACKAGE_NAME=org.fdroid.fdroid
STACK_TRACE_HASH=b441949d
APP_VERSION_NAME=1.6.2
ANDROID_VERSION=8.0.0
BRAND=motorola
DISPLAY=0.currentSizeRange.smallest=[720,672]
0.currentSizeRange.largest=[1184,1136]
0.flags=FLAG_SUPPORTS_PROTECTED_BUFFERS+FLAG_SECURE
0.height=1184
0.metrics.density=2.0
0.metrics.densityDpi=320
0.metrics.scaledDensity=x2.0
0.metrics.widthPixels=720
0.metrics.heightPixels=1184
0.metrics.xdpi=281.353
0.metrics.ydpi=282.713
0.name=Built-in Screen
0.orientation=0
0.pixelFormat=1
0.realMetrics.density=2.0
0.realMetrics.densityDpi=320
0.realMetrics.scaledDensity=x2.0
0.realMetrics.widthPixels=720
0.realMetrics.heightPixels=1280
0.realMetrics.xdpi=281.353
0.realMetrics.ydpi=282.713
0.realSize=[720,1280]
0.rectSize=[0,0,720,1184]
0.refreshRate=60.000004
0.rotation=ROTATION_0
0.size=[720,1184]
0.width=720
0.isValid=true
USER_COMMENT=
CUSTOM_DATA=