I seem to be getting this error again and have been seeing it for a while now, but I have not had time to report it to you. Here is as much detail as I can figure out.
My coworker and I both agree this error has something to do with an object being disposed or odd memory usage, but cannot find it in our code. I've examined the Radio object that is passed around and cannot find anything wrong with it at any point. The WCL.Radio has no function to determine if it is disposed however, all the other properties in the class return valid values.
Here is a flow to get to this error:
- Device is put into Discoverable mode
- Application begins discovering over and over until the user enters a passkey and selects a device to pair with in the UI
- Application calls Pair ( radio, passkey )
- If Pair was successful, the application calls IsPaired ( radio )
-- This is the call to WCL.Device.Paired that gives the "Catastrophic failure" error, oddly after another call to WCL.Device.Paired immediatly before.
Here is the flow of each of the specific wrapper functions involved:
Pair ( radio, passkey )
If IsPaired(radio)
Unpair(radio)
WCL.Device.Pair(radio)
UnPair ( radio )
If IsPaired(radio)
WCL.Device.Unpair(radio)
IsPaired ( radio )
WCL.Device.Paired(radio)
I usually see the Catastrophic failure message, about 3 out of every 4 pair attempts, however I saw this Out of Memory error once today and am not sure if it is related.
System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
at WCLX.wclBluetoothDevicexClass.get_Paired(wclBluetoothRadiox Radio)
at wclnet.wclBluetoothDevice.Paired(wclBluetoothRadio Radio)
System.Runtime.InteropServices.COMException (0x8000FFFF): Out of memory
at WCLX.wclBluetoothDevicexClass.get_Paired(wclBluetoothRadiox Radio)
at wclnet.wclBluetoothDevice.Paired(wclBluetoothRadio Radio)
This error happens on the latest release of the WCL, the version released on July 16th.