App crashes sometime after BluetoothClient.sendText

I've some code that sends short messages over (classic) bluetooth, E.g.

Using ADB I get the following crash log:

Blockquote
--------- beginning of crash
06-24 20:58:27.532 4724 17673 E AndroidRuntime: FATAL EXCEPTION: Thread-6
06-24 20:58:27.532 4724 17673 E AndroidRuntime: Process: com.google.android.providers.media.module, PID: 4724
06-24 20:58:27.532 4724 17673 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.storage.StorageVolume.getMediaStoreVolumeName()' on a null object reference
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at com.android.providers.media.util.FileUtils.getVolumeName(FileUtils.java:837)
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at com.android.providers.media.scan.ModernMediaScanner$Scan.(ModernMediaScanner.java:312)
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at com.android.providers.media.scan.ModernMediaScanner.scanDirectory(ModernMediaScanner.java:225)
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at com.android.providers.media.MediaProvider.scanDirectory(MediaProvider.java:1111)
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at com.android.providers.media.MediaService.onScanVolume(MediaService.java:148)
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at com.android.providers.media.MediaProvider.onIdleMaintenance(MediaProvider.java:999)
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at com.android.providers.media.IdleService.lambda$onStartJob$0(IdleService.java:43)
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at com.android.providers.media.IdleService.lambda$onStartJob$0$IdleService(Unknown Source:0)
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at com.android.providers.media.-$$Lambda$IdleService$JjwnmffYz-dHZaOMAebPNoWHP20.run(Unknown Source:4)
06-24 20:58:27.532 4724 17673 E AndroidRuntime: at java.lang.Thread.run(Thread.java:923)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: FATAL EXCEPTION: Thread-3
06-24 20:59:02.805 17809 18033 E AndroidRuntime: Process: com.google.android.providers.media.module, PID: 17809
06-24 20:59:02.805 17809 18033 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.storage.StorageVolume.getMediaStoreVolumeName()' on a null object reference
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at com.android.providers.media.util.FileUtils.getVolumeName(FileUtils.java:837)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at com.android.providers.media.scan.ModernMediaScanner$Scan.(ModernMediaScanner.java:312)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at com.android.providers.media.scan.ModernMediaScanner.scanDirectory(ModernMediaScanner.java:225)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at com.android.providers.media.MediaProvider.scanDirectory(MediaProvider.java:1111)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at com.android.providers.media.MediaService.onScanVolume(MediaService.java:148)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at com.android.providers.media.MediaProvider.onIdleMaintenance(MediaProvider.java:999)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at com.android.providers.media.IdleService.lambda$onStartJob$0(IdleService.java:43)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at com.android.providers.media.IdleService.lambda$onStartJob$0$IdleService(Unknown Source:0)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at com.android.providers.media.-$$Lambda$IdleService$JjwnmffYz-dHZaOMAebPNoWHP20.run(Unknown Source:4)
06-24 20:59:02.805 17809 18033 E AndroidRuntime: at java.lang.Thread.run(Thread.java:923)

Any ideas please

We don't see the rest of the project. We don't know what extensions you're using. This code should not crash. What device, what android. Also, I don't think this log shows when the error occurred in your app. Use filtering, e.g. by the package name of your app.

Thanks for replying. I've cut down the app to the minimum.

The test sequence was to tap the two buttons to prove they work, select a BT device, tap a button, then tap another and note that there is no response.

and this is the filtered log:

18.358 568 1136 I BufferQueueProducer: ===TEST_BT===/===TEST_BT===.Screen1#0 queueBuffer: fps=0.82
dur=3649.57 max=3600.61 min=18.43
20.993 568 629 I BufferQueueProducer: ===TEST_BT===/===TEST_BT===.Screen1#0 queueBuffer: fps=1.52
dur=2634.79 max=2503.26 min=4.72
28.073 568 1136 I BufferQueueProducer: ===TEST_BT===/===TEST_BT===.Screen1#0 queueBuffer: fps=0.56
dur=7080.29 max=6937.15 min=15.18
28.211 1083 1261 I ActivityTaskManager: START u0 {cmp====TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity (has extras)} from uid 10170
28.226 550 581 I mtkpower@impl: [notifyAppState] act ===TEST_BT===.Screen1 => com.google.appinventor.components.runtime.ListPickerActivity
28.226 1083 3763 W WindowManager: Changing focus fromWindow{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} to null displayId=0
Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:457 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:5599 com.android.server.wm.DisplayContent.setFocusedApp:5517
com.android.server.wm.ActivityTaskManagerService.setResumedActivityUncheckLocked:5522
28.230 1083 1261 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{16bf5c9 u0
===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
28.248 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
28.248 1083 3763 I InputDispatcher: Focus left window: Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} in display 0
28.248 1083 3763 I InputDispatcher: Window went away: Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1}
28.258 568 1135 I SurfaceFlinger: [SF client] NEW(0xb40000724113b3b0) for (21129:===TEST_BT===)
28.277 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
28.285 1083 3763 I WindowManager: Relayout Window{bab122e u0 ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity}: oldVis=4 newVis=0 focusMayChange =
true
28.289 1083 3763 W WindowManager: Changing focus fromnull to Window{bab122e u0 ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} displayId=0
Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:457 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:5599 com.android.server.wm.WindowManagerService.relayoutWindow:2392
com.android.server.wm.Session.relayout:213
28.295 568 1135 I BufferQueueProducer: ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 connect(): api=1
producerControlledByApp=false
28.296 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.313 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.313 1083 3763 I InputDispatcher: Window went away: ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0
28.332 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.337 1083 1113 I ActivityTaskManager: Displayed ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity: +126ms
28.349 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.349 1083 2746 I InputDispatcher: Focus entered window: Window{bab122e u0 ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} in display 0
28.356 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.360 2615 2615 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1902 onStartInput(EditorInfo{EditorInfo{packageName====TEST_BT===, inputType=0,
inputTypeString=NULL, enableLearning=false, autoCorrection=false, autoComplete=false, imeOptions=0, privateImeOptions=null, actionName=UNSPECIFIED, actionLabel=null, initialSelStart=-1, initialSelEnd=-1, initialCapsMode=0,
label=null, fieldId=-1, fieldName=null, extras=null, hintText=null, hintLocales=[]}}, false)
28.375 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.393 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.411 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.432 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.454 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.478 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.494 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.509 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.525 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.540 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.555 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.557 568 629 I BufferQueueProducer: ===TEST_BT===/===TEST_BT===.Screen1#0 disconnect(): api=1
28.572 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.590 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
28.607 568 568 I BufferQueueConsumer: ===TEST_BT===/===TEST_BT===.Screen1#0 disconnect()
28.607 568 568 I BufferQueue: ===TEST_BT===/===TEST_BT===.Screen1#0 onDestructor()
28.609 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{bab122e u0
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
28.610 1083 2746 I InputDispatcher: Window went away: ===TEST_BT===/===TEST_BT===.Screen1#0
29.495 568 1136 I BufferQueueProducer: ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0
queueBuffer: fps=1.70 dur=1175.01 max=1156.43 min=18.58
30.517 568 1136 I BufferQueueProducer: ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0
queueBuffer: fps=16.63 dur=1022.34 max=757.15 min=7.94
30.583 550 581 I mtkpower@impl: [notifyAppState] act com.google.appinventor.components.runtime.ListPickerActivity => ===TEST_BT===.Screen1
30.584 1083 3763 W WindowManager: Changing focus fromWindow{bab122e u0 ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} to null displayId=0
Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:457 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:5599 com.android.server.wm.DisplayContent.setFocusedApp:5517
com.android.server.wm.ActivityTaskManagerService.setResumedActivityUncheckLocked:5522
30.597 1083 2746 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
30.597 1083 2746 I InputDispatcher: Focus left window: Window{bab122e u0 ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity} in display 0
30.597 1083 2746 I InputDispatcher: Window went away: Window{bab122e u0 ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity}
30.614 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
31.825 1083 3763 I WindowManager: Relayout Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1}: oldVis=8 newVis=0 focusMayChange = true
31.830 1083 3763 W WindowManager: Changing focus fromnull to Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} displayId=0
Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:457 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:5599 com.android.server.wm.WindowManagerService.relayoutWindow:2392
com.android.server.wm.Session.relayout:213
31.835 568 1136 I BufferQueueProducer: ===TEST_BT===/===TEST_BT===.Screen1#0 connect(): api=1
producerControlledByApp=false
31.846 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 ===TEST_BT===/===TEST_BT===.Screen1#0 Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
31.856 568 628 I BufferQueueProducer: ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0
queueBuffer: fps=1.49 dur=1339.23 max=1272.92 min=66.31
31.861 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
31.862 1083 3763 I InputDispatcher: Window went away: ===TEST_BT===/===TEST_BT===.Screen1#0
31.869 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
31.869 1083 3755 I InputDispatcher: Focus entered window: Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} in display 0
31.887 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
31.896 2615 2615 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1902 onStartInput(EditorInfo{EditorInfo{packageName====TEST_BT===, inputType=0,
inputTypeString=NULL, enableLearning=false, autoCorrection=false, autoComplete=false, imeOptions=0, privateImeOptions=null, actionName=UNSPECIFIED, actionLabel=null, initialSelStart=-1, initialSelEnd=-1, initialCapsMode=0,
label=null, fieldId=-1, fieldName=null, extras=null, hintText=null, hintLocales=[]}}, false)
31.906 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
31.927 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
31.942 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
31.960 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
31.974 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
31.990 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
32.007 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
32.024 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
32.041 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
32.049 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
32.085 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar}
===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 Window{16bf5c9 u0 ===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0
com.android.systemui.ImageWallpaper}
32.096 568 1738 I BufferQueueProducer: ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 disconnect(): api=1
32.102 1083 3755 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{16bf5c9 u0
===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
32.102 1083 3755 I InputDispatcher: Window went away: ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0
32.120 568 568 I BufferQueueConsumer: ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 disconnect()
32.120 568 568 I BufferQueue: ===TEST_BT===/com.google.appinventor.components.runtime.ListPickerActivity#0 onDestructor()
32.122 1083 1261 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{16bf5c9 u0
===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
32.138 1083 1261 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{16bf5c9 u0
===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
33.311 568 1135 I BufferQueueProducer: ===TEST_BT===/===TEST_BT===.Screen1#0 queueBuffer: fps=1.37
dur=1464.87 max=1387.55 min=77.31
39.601 1083 1176 I WindowManager: Input event dispatching timed out sending to ===TEST_BT===/===TEST_BT===.Screen1. Reason: 16bf5c9
===TEST_BT===/===TEST_BT===.Screen1 (server) is not responding. Waited 5004ms for MotionEvent
39.824 1083 1176 W InputDispatcher: Canceling events for 16bf5c9 ===TEST_BT===/===TEST_BT===.Screen1 (server) because it is unresponsive
39.880 1083 21176 I AnrManager: startAsyncDump: AnrDumpRecord{ Input dispatching timed out (16bf5c9 ===TEST_BT===/===TEST_BT===.Screen1 (server) is not
responding. Waited 5004ms for MotionEvent) ProcessRecord{17f8958 21129:===TEST_BT===/u0a170} IsCompleted:false IsCancelled:false }, isSilentANR = false
39.880 1083 21176 I AnrManager: dumpAnrDebugInfo begin: AnrDumpRecord{ Input dispatching timed out (16bf5c9 ===TEST_BT===/===TEST_BT===.Screen1 (server)
is not responding. Waited 5004ms for MotionEvent) ProcessRecord{17f8958 21129:===TEST_BT===/u0a170} IsCompleted:false IsCancelled:false }, isAsyncDump = false, isSilentANR = false
39.880 1083 21176 I AnrManager: dumpAnrDebugInfoLocked: AnrDumpRecord{ Input dispatching timed out (16bf5c9 ===TEST_BT===/===TEST_BT===.Screen1 (server)
is not responding. Waited 5004ms for MotionEvent) ProcessRecord{17f8958 21129:===TEST_BT===/u0a170} IsCompleted:false IsCancelled:false }, isAsyncDump = false, isSilentANR = false
39.883 1083 3763 I InputDispatcher: setInputWindows displayId=0 Window{4e5dad8 u0 NavigationBar0} Window{287bd6 u0 StatusBar} Window{16bf5c9 u0
===TEST_BT===/===TEST_BT===.Screen1} Window{fe921f1 u0 com.android.systemui.ImageWallpaper}
40.381 1083 1124 I AnrManager: START_ANR_DUMP_MSG: AnrDumpRecord{ Input dispatching timed out (16bf5c9 ===TEST_BT===/===TEST_BT===.Screen1 (server) is
not responding. Waited 5004ms for MotionEvent) ProcessRecord{17f8958 21129:===TEST_BT===/u0a170} IsCompleted:false IsCancelled:false }, isSilentANR = false
40.381 1083 1124 I AnrManager: dumpAnrDebugInfo begin: AnrDumpRecord{ Input dispatching timed out (16bf5c9 ===TEST_BT===/===TEST_BT===.Screen1 (server)
is not responding. Waited 5004ms for MotionEvent) ProcessRecord{17f8958 21129:===TEST_BT===/u0a170} IsCompleted:false IsCancelled:false }, isAsyncDump = true, isSilentANR = false

Note:
a) the "is not responding entry" in the log. I couldn't see anything untoward happening prior to that but I'm not an expert. The only thing I can think of is that the Bluetooth Client has hung/crashed.
b) I've replaced the App name with ===TEST_BT=== to cut down the size of this post

Any more thought will be gratefully received.