SDK access violation using JPEGLiveSource with some cameras

My problem appears very similar to this one, which is marked as solved but doesn’t give information about any solution:

https://force.milestonesys.com/support/MccSupportCommunity#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=90620000000H3xZAAS

I have tried on several machines and only get the problem on two of them. I can’t see what the difference is. They are all Windows 10 build 1511 (latest update).

In summary: when playing live video from, JPEGLiveSource crashes (including in the SDK example app).

But is okay on some PCs.

On PCs where it doesn’t work, sometimes it succeeds in displaying a single frame before crashing.

Application: MediaLiveViewer.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.AccessViolationException

at VideoOS.Toolkit.LivePlaybackSourceToolkit.GetLiveData(VideoOS.Toolkit.IData ByRef, System.TimeSpan)

at VideoOS.Platform.SDK.Media.SDKInternalMediaService.LiveGet(System.Object, System.TimeSpan, Boolean)

at VideoOS.Platform.SDK.Media.SDKInternalMediaService.LiveGet(System.Object, System.TimeSpan)

at VideoOS.Platform.Live.JPEGLiveSource.PollThread()

at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)

at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

at System.Threading.ThreadHelper.ThreadStart()

Is this the newest version of the MIP SDK?

It’s not, it’s 2013, and the Product version string on VideoOS.Platform.SDK.dll is 4.5.191241. Unfortunately I need to support users on that version and later!

I have found that AccessViolationException has been seen if the dependent files are mixed in version.

Concretely this can happen if you have ToolkitSourcePlugin_is.dll and ToolkitSourcePlugin_mmp.dll originating from an older MIP SDK, these are not used in newer MIP SDK but can cause the issue if still leftover from the older MIP SDK application.

Try the remove the dependent files and then copy new ones in from the MIP SDK you are using.

If you go with the newest MIP SDK which is recommended: Delete thet dependent files and copy new ones in (not just copy new ones on top as it will then not remove the ones no longer used).

You can use the new MIP SDK.

(remember the MIP SDK is ‘backwards’ compatible) (https://force.milestonesys.com/support/articles/en_US/FAQ/About-MIP-SDK-compatibility-with-XProtect-product-versions)

I using the newer MIP SDK please also note. (https://force.milestonesys.com/support/articles/en_US/How_To/Processor-architecture-compatibility-for-the-Milestone-Integration-Platform-MIP-SDK)

Recommended read on dependent files is the “.NET Library Initialization” page in the MIP SDK Documentation.

or (https://force.milestonesys.com/support/articles/en_US/How_To/Dependent-files-in-MIP-SDK)

Thanks, very helpful links. I rebuilt the example from the 2016 SDK and have no problem now.