Skip to content

DeviceFoundAsync spuriously throws an Exception #23

Description

@ChristianSauer

This does not happen all the time, but rarely. Looks like a race condition for me:

Stacktraces I managed to capture:

Message: Value does not fall within the expected range.

at System.BluetoothLe.Adapter.DeviceFoundAsync(BluetoothLEAdvertisementWatcher watcher, BluetoothLEAdvertisementReceivedEventArgs btAdv)\r\n   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)\r\n   at System.Threading.ThreadPoolWorkQueue.Dispatch()\r\n   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

or

"Message":"Schwerwiegender Fehler (0x8000FFFF (E_UNEXPECTED))"

 at System.BluetoothLe.Adapter.DeviceFoundAsync(BluetoothLEAdvertisementWatcher watcher, BluetoothLEAdvertisementReceivedEventArgs btAdv)\r\n   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)\r\n   at System.Threading.ThreadPoolWorkQueue.Dispatch()

both seem to be thrown unobserved, which makes catching them difficult.

I do not have more stacktraces atm, this mangled stuff comes from our error reporting system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions