BluetoothUIServer bug steals focus every 30 seconds triggered by unpaired Bluetooth device

Originator:long.zheng
Number:rdar://FB9966159 Date Originated:2022-03-25
Status:Open Resolved:
Product:macOS Product Version:12.3
Classification:Incorrect/Unexpected Behavior Reproducible:Always
 
I was experiencing losing active window focus every 30 seconds which made typing and coding impossible. This was a new problem I had only experienced since the morning I started using the computer. The previous night was fine and didn’t have this issue.

Using a Python script to find which program was stealing my window focus https://apple.stackexchange.com/questions/123730/is-there-a-way-to-detect-what-program-is-stealing-focus-on-my-mac
I narrowed down that the BluetoothUIServer was stealing focus every 30 seconds.
(Attached screenshot)

I had already tried
- unpair all bluetooth devices
- turn off and turn on bluetooth
- restart computer multiple times
Without any luck and the problem was still occurring.

I opened Console and observed that “BluetoothUIServer” was failing to load a window every time I lost window focus
-[JustWorksWindowController loadWIndow]: failed to load window nib file ‘(null)’.
(Attached screenshot)

Then subsequently I can also see “running board” setting bluetoothUIServer as the active window which is why I lose focus.

Upon further trial and error, I physically restarted all the Bluetooth devices near the laptop.

I ultimately found that after restarting my bluetooth speaker (Samsung M3 Wireless Multiroom Speaker), the problem was no longer occurring.

I suspect that the speaker was sending out a “bad” Bluetooth packet which triggered the BluetoothUIServer bug.

I’m unclear what is the intended behaviour with this scenario but I believe there’s a bug in either
- BluetoothUIServer should be displaying some sort of window that it is unable to do
- BluetoothUIServer should not be stealing focus in this scenario

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!