Unable to connect to toolkit!

Hi

Some times MIP SDK keep giving me “Unable to connect to toolkit!” error in the middle of exporting then I need to restart my service. Is there any way to fix this bug without restarting my software ?

I am using Milestone XProtect Version: 1001, Server version: 10.0.505.1

MIPSDK_2017R1

Thanks.

Khayralla

When this happens does the recording server crash?

Do you restart your service only or also the VMS (or part of it)?

If you do the same export in the Smart Client do you see the same issue?

What is the method / class you are using?

What is the XProtect product?

I think recording server didn’t crash. (no error message in the event Viewer).

I restart my service only (console application in debug mode in this case).

No such problem when I used Smart Client or when my app restarted and do same export.

DataIExporter exporter new Data.MKVExporter();
MKVExporter mkvExporter = exporter as Data.MKVExporter;
exporter.StartExport(utcTimeBegin, utcTimeEnd);

Product version is 10.0.505.1

What is the XProtect server? Corporate? Professional? Expert? XProtect Enterprise? Express?

it is Corporate version

I think I have seen cases of this if the initialization or if the dll’s are not correct.

See if you have

VideoOS.Platform.SDK.Export.Environment.Initialize();

See if you have the dll’s from [C:\Program](file:C:/Program) Files\Milestone\MIPSDK\Bin (using CopyExportFiles.bat).

VideoOS.Platform.SDK.Initialize();
VideoOS.Platform.SDK.Export.Environment.Initialize();

I have all initialization and all dll copied to my bin folder.

This issue occurs from time to time, it is not happened each time I test my application (some times 3 weeks to see it again).

Seems wrong, do you mean -

VideoOS.Platform.SDK.Environment.Initialize();

?

using SDKEnvironment = VideoOS.Platform.SDK.Environment;
.
.
SDKEnvironment.Initialize();

Initialization is working perfect, I made a typo in previous post.

Hi,

We are experiencing the same issue. In our case error is happens in every try.

Our case is generation of snapshot. Exception details are:

PMException in generating snapshot : VideoOS.Platform.CommunicationMIPException: Unable to connect to toolkit! - —> VideoOS.Toolkit.NotConnectedException: Unable to connect to toolkit!

at VideoOS.Toolkit.SourceToolkit.Connect(ISet`1 requestedPropertyNames, ISet`1& availablePropertyNames, TimeSpan timeout)

at VideoOS.Toolkit.SourceToolkit.Connect(ISet`1 requestedPropertyNames, ISet`1& availablePropertyNames)

at VideoOS.Platform.SDK.Export.SDKInternalCommandService.ToolkitConnectWithExceptionHandling(IPlaybackSourceToolkit toolkit, ISet`1 properties, ISet`1& availableProperties)

— End of inner exception stack trace —

at VideoOS.Platform.SDK.Export.SDKInternalCommandService.ToolkitConnectWithExceptionHandling(IPlaybackSourceToolkit toolkit, ISet`1 properties, ISet`1& availableProperties)

at VideoOS.Platform.SDK.Export.SDKInternalCommandService.ImageExporterConnect(FQID deviceFQID, Int32 width, Int32 height, Boolean keepAspectRatio, Boolean fillSpace, Boolean allowUspcaling)

at VideoOS.Platform.Data.JPEGVideoSource.Init(Int32 width, Int32 height)

at VideoOS.Platform.Data.JPEGVideoSource.Init()

The code is compiled as x64 and all milestone binary are copied to bin folder of test application (x64 version too). Server version is: Expert 2016 R3 10.2a.

We tried with MIP 2016 R3 and then 2017R1 - same error appearing.

How we can fix this?

There is two known causes to the “unable to conect to toolkit”.

  1. Recording server down, if this is the cause your will see errors when using the Smart Client as a reference test.

  2. Files not right, can you please try to remove all files and then copy a new set from the MIP SDK ([C:\Program](file:C:/Program) Files\Milestone\MIPSDK\Bin)?

-

We have a tool to analyze dependencies

Direct link: http://download.milestonesys.com/mipsdk/mdepends.zip

Load your executable in this tool, it might reveal something amiss.

Thank you for the fast response.

I have check all options:

We have C++ redistributor installed.

The correct binaries are copied to our console application.

I check with the tool and there are no missing binaries.

I can see in XProtect that cameras are recording. Tested with Smart Client and i was able to see stream from yesterday.

Sending you screenshots with my tests:

And installed c++ libraries:

In our case XProtect and Recording servers are on separated machines. Can this be the reason?

Do we have the correct C++ binaries installed?

Are you using a camera with h.265? What is the codec used in the setup of the camera?

Would it be possible for you to make a mini-project with only this and send it to me so that I can see it and debug?