ImageViewerWpfControl throws Exception in MulticastConfig

We are experiencing a problem with using the SDK and ImageViewerWpfControl, as used in the samples found on your github repository (Examples: VideoViewer and VideoViewer2Playback).

When we connect the client to a multicasting camera (XProtect Corporate), we get the following exception:

Exception thrown: ‘System.InvalidOperationException’ in WindowsBase.dll

MIP: Error: MulticastConfig (): The calling thread cannot access this object because a different thread owns it.

This exception is thrown from inside the SDK.

When this happens, no video is shown in the WpfControl.

This is an issue that often happens when not handling UI actions on the UI thread. We suspect that somewhere inside the SDK, an attempt to call Task.Run causes this issue.

We have tried the most recent available versions of the .DLL’s from nuget.

There is no problem when multicast video is disabled in the server.

I enabled the Live multicast in my test setup in the Milestone test lab. I was able to see the issue as you have described it. I will ask Milestone Development to investigate. I will post updates here when I have feedback to share..

Milestone Development has fixed the issue and the fix will be included in MIP SDK 2025R2