After updating Milestone SDK from 2020 R3 to 2021 R2 we started encounter a problem every time Uri field length of VideoOS.Platform.SDK.Environment.AddServer() call is longer than 132 symbols.
It fails with with VideoOS.Platform.CommunicationMIPException “Unable to connect to toolkit!”. We use VideoOS.Platform.SDK.Environment to open files that were previously exported with DBExporter in BLK format.
file://brief-evgeniy/Briefcam/ServerData/VideoData/VideoFiles/FetchedFiles/77/1-17-2022 5_10_00 PM/Sony SNC-VB6xx-VM6xx-EM6xx Series (172.25.25.20) - Camera 1
We had a similar issue recently regarding export, but as those compoenents are sharing code I tried to use BitmapVideoSource from the hotifxed version with a 240 character long path and it worked fine, so could you please try out with the latest cumulative patch described here:
Unfortunately we have not started pushing hotfixes to NuGet yet (we will do that starting with 2022 R1 release coming next month), so if you are currently using the Nuget packages you will have to replace your references with direct assembly references.
Please let us know whether the hotfix works for you.
We did further investigation and unfortunately the reason is that the database file structure for the XProtect database means that some files will have a path that is around 126 characters longer than the base path and as a lot of Windows functions only supports paths up to 260 characters long it means that the base path cannot be more than 134 characters long (or maybe 132 as you say if I have overlooked some path that is slightly longer).
This unfortunately means that there is not much we can do about this limit with the current database layout (and we cannot easily change that).
We tested “long paths enabling”, unfortunately it does not make a difference. Retesting, I found that setting the registry and applying the manifest I could both export and open the export while using paths longer than 300 characters.
Without applying the workaround of enabling long paths:
We then tested opening an export. First with MIP SDK 2020R3 PlaybackWpfUser sample then with newest MIP SDK ImageViewerClient sample (same sample but it was renamed) in both cases the path where it failed was the exact same length.
We tested with [E:\Downloads\_exp\longnametest567890123456789012345678901234567890123456789012345678901234567890123456789012\Client](file:E:/Downloads/_exp/longnametest567890123456789012345678901234567890123456789012345678901234567890123456789012/Client) Files\ which means a path that is 122 characters (one extra character put in the path makes it fail).
I am speculating if you have camera names that are longer in one of your tests than in the other test?
Hi Bo Ellegard, so as far as I understood we are stuck with this limitation. So I guess we (Milestone and Birefcam) have to come with a cohesion how to proceed with this. Enabling long paths for Win32 does not solved your problem, so maybe we need some compression or UUID resolution in order to make it work. Can we have like a developer session so we can understand between how to nail that problem and see our both sides so we can help each other.
I believe Briefcam has a partner representative at Milestone, please bring this up, it might be possible to develop new functionality that will enable exporting to longer paths than what the current functionality supports.
Thank you, Bo Ellegard for the assistance you are willing to provide. I will speak with our representative and we may discuss or have a direct meeting with you about that extra fix. You may see my mail in my Milestone account so, you can write me a direct mail to setup a meeting.
We are currently looking into this, but I also did a reread of the Microsoft post Evgeniy refers to above and realized that we had overlooked the part about the addition to the assembly manifest. After adding that to the test application everything seems to be working fine, so maybe that could be a work-around at least for now?
Yes, we also realized that, which unfortunately means that we cannot set it for the SDK binaries, and it thus have to be done by the partners utilizing them. We are working on a KB article informing about this.