My system UI started constantly crashing on my Pixel 5.

Below is the stacktrace. Any help would be appreciated. Thank you

type: crash
osVersion: google/redfin/redfin:14/UP1A.231105.001.B2/2024082200:user/release-keys
package: com.android.systemui:34
process: com.android.systemui
processUptime: 75055 + 348 ms

android.os.DeadSystemRuntimeException: android.os.DeadSystemException
	at android.net.wifi.WifiManager.getScanResults(WifiManager.java:4528)
	at com.android.systemui.statusbar.connectivity.NetworkControllerImpl$5.onScanResultsAvailable(go/retraceme 0d5ffc2b88cb7620214a6c097d6bcf6643a9e80b4a4780d1866b426a1eddc11b:8)
	at android.net.wifi.WifiManager$ScanResultsCallback$ScanResultsCallbackProxy$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
	at android.os.Handler.handleCallback(Handler.java:959)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: android.os.DeadSystemException
	... 8 more

    Small update here. This started happening after coming into an airport, but not connecting to its wifi. Turning off wifi altogether seems to have fixed the issue.
    It's still unexpected that coming into the range of a public wifi would make system ui start crashing, effectively making the phone unusable.

      hercules WifiManager.getScanResults

      hercules Turning off wifi altogether seems to have fixed the issue.

      https://developer.android.com/reference/android/os/DeadSystemException

      I admit I don't know what the cause is, but it sure seems like something related to wifi is messed up.

      I'd try restarting to see if that fixes the issue. You can also try resetting wifi in settings > system > reset Bluetooth and wifi.

      Have you disabled or messed with any system apps' permissions, i.e. any apps that you didn't install yourself?

      I don't remember changing permissions for system apps.
      I've had no problems after leaving that airport and reenabling wifi... I guess this will remain a mystery for now.