I’m using the C# SDK wrapper in a WPF application. When I close the application (when debugging) Visual Studio breaks in with the following error message:
Managed Debugging Assistant ‘DisconnectedContext’ : ‘Transition into COM context 0xbe6950 for this RuntimeCallableWrapper failed with the following error: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED)). This is typically because the COM context 0xbe6950 where this RuntimeCallableWrapper was created has been disconnected or it is busy doing something else. Releasing the interfaces from the current COM context (COM context 0xbe6a08). This may cause corruption or data loss. To avoid this problem, please ensure that all COM contexts/apartments/threads stay alive and are available for context transition, until the application is completely done with the RuntimeCallableWrappers that represents COM components that live inside them.’
SDK version v5.2.41727.0928
Visual Studio 2019 version 16.8.1
Steps to reproduce the behavior:
- Open the C# demo application that comes with the SDK
- Set the SDK DLL path in App.xaml.cs
- Change MainWindow.button_auth_Click to use AuthParam with a hard-coded SDK key/secret instead of AuthContext (more on that below)
- Run the app
- Hit “Auth” (the textbox content doesn’t matter at this point)
- The “Start Meeting” dialog comes up
- Close the dialog
- The debugger breaks with the error message in the description
I’ve observed the same behavior in my rather larger WPF app that’s been working fine with SDK version v4.6.21666.0428. (I only started seeing this problem when I upgraded the SDK.) I used the demo app to make sure it wasn’t anything I’ve done wrong in the code.
I did try to use the AuthContext with a JWT, but the result of SDKAuth (which the demo app doesn’t check) is 0xf, which isn’t even a member of the SDKError enum, so it’s hard to know what on earth is going wrong there. The rest of the app works fine when using AuthParam - I can investigate moving to JWT separately, once I’ve worked out what’s causing this issue.