[Xiaomi Poco X3 NFC ROMs, Kernels, Recoveries, & Ot] Luxxxx:
Sometimes after the crash the system tells the app is continously crashing and proposes to dump the crash report. Here it is:

time: 1617882286115

msg: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.preference.Preference.onPrepareForRemoval()' on a null object reference

stacktrace: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.Settings$PowerUsageSummaryActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.preference.Preference.onPrepareForRemoval()' on a null object reference

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3431)

at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)

at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)

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:2066)

at android.os.Handler.dispatchMessage(Handler.java:106)

at android.os.Looper.loop(Looper.java:223)

at android.app.ActivityThread.main(ActivityThread.java:7656)

at java.lang.reflect.Method.invoke(Native Method)

at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.preference.Preference.onPrepareForRemoval()' on a null object reference

at androidx.preference.PreferenceGroup.removePreferenceInt(PreferenceGroup.java:299)

at androidx.preference.PreferenceGroup.removePreference(PreferenceGroup.java:275)

at com.android.settings.fuelgauge.PowerUsageSummary.onCreate(PowerUsageSummary.java:280)

at androidx.fragment.app.Fragment.performCreate(Fragment.java:2883)

at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:484)

at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1312)

at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1477)

at androidx.fragment.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1246)

at androidx.fragment.app.FragmentTransition.calculateFragments(FragmentTransition.java:1128)

at androidx.fragment.app.FragmentTransition.startTransitions(FragmentTransition.java:135)

at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2112)

at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2055)

at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1957)

at androidx.fragment.app.FragmentManager.executePendingTransactions(FragmentManager.java:572)

at com.android.settings.SettingsActivity.switchToFragment(SettingsActivity.java:586)

at com.android.settings.SettingsActivity.launchSettingFragment(SettingsActivity.java:374)

at com.android.settings.SettingsActivity.onCreate(SettingsActivity.java:282)

at android.app.Activity.performCreate(Activity.java:8000)

at android.app.Activity.performCreate(Activity.java:7984)

at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404)

... 11 more