VC++ 2015/2017 Redistributables issue

Moderators: TomKerekes, dynomotion

SamMarrocco
Posts: 10
Joined: Fri Apr 27, 2018 12:44 pm

Re: VC++ 2015/2017 Redistributables issue

Post by SamMarrocco » Tue May 07, 2019 1:33 pm

Understood. I'm not sure how the existing USB driver would have gotten removed/uninstalled since I know it was on this machine previously. Perhaps a windows or other software update....

I copied the FTD2XX.dll file to the c:\windows folder then ran my application. I then removed FTD2XX.dll and copied it to my app's installation folder. In both cases, my application now started, getting past the previous error during initialization of the KM_Controller.

Perhaps I should add the inclusion of ftd2xx.dll

At this point my code is running but does not appear to be able to connect to the KFlop. Numerous console errors are thrown as follows:

***ErrorReceived: No KMotion devices available
Exception thrown: 'KMotion_dotNet.DMException' in KMotion_dotNet.dll
***ErrorReceived: No KMotion devices available
Exception thrown: 'KMotion_dotNet.DMException' in KMotion_dotNet.dll
***ErrorReceived: No KMotion devices available
Exception thrown: 'KMotion_dotNet.DMException' in KMotion_dotNet.dll
***ErrorReceived: No KMotion devices available
Exception thrown: 'KMotion_dotNet.DMException' in KMotion_dotNet.dll
***ErrorReceived: Can't Connect to KMotion Board #0
Exception thrown: 'KMotion_dotNet.DMException' in KMotion_dotNet.dll
***ErrorReceived: No KMotion devices available
Exception thrown: 'KMotion_dotNet.DMException' in KMotion_dotNet.dll
***ErrorReceived: No KMotion devices available
Exception thrown: 'KMotion_dotNet.DMException' in KMotion_dotNet.dll
***ErrorReceived: No KMotion devices available
Exception thrown: 'KMotion_dotNet.DMException' in KMotion_dotNet.dll
***ErrorReceived: No KMotion devices available
Exception thrown: 'System.Exception' in KMotion_dotNet.dll


I made certain that the FTD2xx.dll file is in the c:\windows folder. I then ran Kmotion/release/KMotion.exe. There are no "USB Locations" available in the pulldown, and opening a Console and attempting to send the Version command results in an error dialog containing:

KMotionDLL
Can't Connect to KMotion Board #0

User avatar
TomKerekes
Posts: 438
Joined: Mon Dec 04, 2017 1:49 am

Re: VC++ 2015/2017 Redistributables issue

Post by TomKerekes » Tue May 07, 2019 3:20 pm

Hi
I copied the FTD2XX.dll file to the c:\windows folder then ran my application. I then removed FTD2XX.dll and copied it to my app's installation folder. In both cases, my application now started, getting past the previous error during initialization of the KM_Controller.
That dll should be copied into the appropriate place in the Windows Folder (not the root) when the USB Driver is installed.

We place an additional copy in the \KMotion\Release folder so those apps can run without a KFLOP ever being installed.

So it seems now the USB Driver is not present or is not working or you don't have a KFLOP physically connected.

You might check and/or update the Driver as described here.

You should have Admin privileges, turn off Windows Defender, and disable any Anti-virus software, etc.
Regards,

Tom Kerekes
Dynomotion, Inc.

SamMarrocco
Posts: 10
Joined: Fri Apr 27, 2018 12:44 pm

Re: VC++ 2015/2017 Redistributables issue

Post by SamMarrocco » Tue May 07, 2019 9:28 pm

So, I know that the KFlop hardware is connected. Assuming that the KFlop USB driver is somehow corrupt/uninstalled, etc, I have attempted to remove everything KMotion-related from this machine. I've done a removal of the KMotion434 folders, then gone in and deleted the leftover dregs manually of all previous KMotion installs. I then removed the ftd2xx.dll from c:\windows. I also went into the device manager and uninstalled the KFlop Motion Controller device and rebooted.

Now attempting a fresh install, I reconnected the KFlop, which does not bring up a request for a driver when plugged in anew.

I ran the KMotion434.exe installer, which brings up the (now familiar) dialog:

KMotion requires
Microsoft VS2015 Redistributables
Would you like to install this?

I give it a 'yes', then when asked about Mach3 I say 'no'.
The installer begins and presents the Microsoft Visual C++ 2015 Redistributable (x86) 14.0.23036 Dialog, to which I agree/install. I know what comes next....

...and now the setup fails, dialoging "One of more issues caused the setup to fail...." "0x80070666 - Another version of this product is already installed"

This is, of course, the earlier problem of not being able to install VC++ 2015 Redist because VC++2017 Redist is already installed, despite the fact that they are "binary compatible".

So, I scrubbed everything clean again, then repeated the steps....but this time when asked to install the "required" VC ++2015 Redistributable, I answered "no". The installation completes and the KFlop - Motion Controller device driver appears in the Device Manager.

I then ran my app, and it ran successfully.

So as near as I can tell, my USB driver was deleted, and the KMotion device disappeared from the Device manager, possibly (speculative) due to a Windows auto-update. This, combined with the VS.Net 2017 "overwrite/superceding" of the VC++ 2015 redistributables confused the issue with a red herring by failing to install the "necessary" 2015 Redist that, apparently is not necessary if the 2017 binary-compatible Redist is present.

I'm going to do some more testing, but at this point it looks like everything is functional again. I'm also going to test against VS2019 and will tell you my results in case anyone else is doing the same.

Thank you for you help with this Tom!

User avatar
TomKerekes
Posts: 438
Joined: Mon Dec 04, 2017 1:49 am

Re: VC++ 2015/2017 Redistributables issue

Post by TomKerekes » Tue May 07, 2019 11:03 pm

Hi SamMarrocco,

Actually Installing/Uninstalling the KMotion PC software should have no effect on the Windows USB Driver so it is a bit of a mystery why that was necessary or in any way helped.

It wasn't clear when you uninstalled the KFlop Motion Controller device if you checked "Delete the driver software for the device". If not, then Windows just re-installs the same driver files it has.

Anyway it all seems good now. Thanks for your patience.

I would be curious on any issues with VS2019. My colleague claims it required 95GB of space to install :)
Regards,

Tom Kerekes
Dynomotion, Inc.

SamMarrocco
Posts: 10
Joined: Fri Apr 27, 2018 12:44 pm

Re: VC++ 2015/2017 Redistributables issue

Post by SamMarrocco » Wed May 08, 2019 12:29 pm

Hm. Not sure what options he used, but my installation included almost everything except the Azure/Cloud stuff and estimated 12 GB of space to install.

SamMarrocco
Posts: 10
Joined: Fri Apr 27, 2018 12:44 pm

Re: VC++ 2015/2017 Redistributables issue

Post by SamMarrocco » Wed May 08, 2019 2:17 pm

As mentioned, I installed Visual Studio 2019 on a machine with VS2015 and VS 2017. After installation I compiled and ran my dotnet apps without any issues or warnings. The app seems to control the KFlop as expected.

Post Reply