vcruntime140_1.dll deleted on Wireshark update/install
Steps to reproduce
have C++ 2015-2019 Redistributable installed
Check the presence of vcruntime140_1.dll in %WINDIR%\system32.
Update Wireshark 3.2.14 to 3.2.15 (or fresh install Wireshark 3.4.7)
Check again the presence of vcruntime140_1.dll in %WINDIR%\system32.
Surprise :)
What is the current bug behavior?
vcruntime140_1.dll was deleted on Wireshark update/install. Therefore, other software dependent on this file will not start (outlook, firefox)
What is the expected correct behavior?
vcruntime140_1.dll should not be touched if already exists :)
Sample capture file
(If possible attach a sample capture file, not screenshot of dissection, showing this issue)
Relevant logs and/or screenshots
(Paste any relevant logs here)
(Paste any relevant screenshots here)
Build information
(In Wireshark, select Help->About Wireshark from the main menu and use the button "Copy To Clipboard".Please paste the complete output here. Or from the command line, run `tshark -v` or `wireshark -v`)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
If this is the cause of the issue, that will require the builders to run the 16.10.4 version of Visual Studio to pick up the latest vcredist. I think they're currently running 16.9.3
I based my comment on the builders output from the pipelines, e.g. from pipeline #343044185.
************************************************************************ Visual Studio 2019 Developer Command Prompt v16.9.3** Copyright (c) 2021 Microsoft Corporation**********************************************************************$ cmake -G "Visual Studio 16 2019" -A x64 -DENABLE_LTO=off ..-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17763.-- The C compiler identification is MSVC 19.28.29913.0-- The CXX compiler identification is MSVC 19.28.29913.0
MSVC 19.28 is 16.8 or 16.9
On my VS 19.10.4 system I get:
************************************************************************ Visual Studio 2019 Developer Command Prompt v16.10.4** Copyright (c) 2021 Microsoft Corporation**********************************************************************-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.-- The C compiler identification is MSVC 19.29.30040.0-- The CXX compiler identification is MSVC 19.29.30040.0
Given that the Visual C++ redistributables occasionally have bugs like this, I wonder if it would make sense to ship the DLLs directly, aka Local Deployment. It looks like we might be able to discover the runtime DLLs InstallRequiredSystemLibraries. One of the arguments against doing that is that is that Windows can't automatically update locally deployed DLLs, but we're pretty aggressive about pushing out updates.
I assume that statically linking our libraries with the VC runtime is Right Out, as it means we're shipping an executable some of the instructions of which would be from non-GPL (but source-available, as far as I know, with the source provided as part of VC) libraries.
I.e., I assume the only thing you can do to ship windows binaries of a GPLed program is to ship an installer program/script that will install the VC runtime, and run that program as part of the installation process for your program.
[Microsoft] had split the CRT into two logical parts: The VCRuntime, which contained the compiler support functionality required for things like process startup and exception handling, and a “stable” part that contained all of the purely library parts of the CRT, which we would service in-place in the future rather than releasing newly versioned DLLs with each major version of Visual Studio. At the time, this “stable” part took the form of two libraries: the AppCRT and the DesktopCRT (the release DLLs were named appcrt140.dll and desktopcrt140.dll).
and that
The VCRuntime still exists in the same form and with equivalent contents as in previous CTPs. It’s in the “stable” part that we’ve made major changes in this latest CTP6. The AppCRT and DesktopCRT have been recombined into a single library, which we have named the Universal CRT. The new DLLs are named ucrtbase.dll (release) and ucrtbased.dll (debug); they do not include a version number because we’ll be servicing them in-place.
The Universal CRT is a component of the Windows operating system. It is included as a part of Windows 10, starting with the January Technical Preview, and it is available for older versions of the operating system via Windows Update.
For what it's worth, I just now updated the Wireshark on my Windows 10 VM to Wireshark 3.4.7 from 3.4.6, and if I try to launch Wireshark, it complains that MSVCP140.dll was not found.
If I try to fix the problem by uninstalling 3.4.7, and then downloading the installer and re-installing it, the problem is still there; the installer appears not to be installing the DLL in question.
Do the recent automated builds fix the issue? 3.4.7 was built with Visual C++ 16.10.1, which shipped with a faulty vcredist according to the link in the first comment. Recent automated builds were built with Visual C++ 16.10.4, which should ship with a working vcredist.
...and appears to leave the system in a state where, not only can I install 3.4.7 on top of the 3.4.8 build, I can then uninstall 3.4.7, install 3.4.5, update to 3.4.7, and the updated-to 3.4.7 works.
I guess it sticks (because the new installer sticks around?).
Hey, BTW, can we sowehow get rid of installing vcredist.exe? Like an optional flag in installer?? It is so effing slow. It is crazy. And yeah I cannot reproduce it, vcruntime140_1.dll is there. An was always there, but then again, I don't install all nightlies anymore :)
But I already have all version 2015-2019 installed, always had. I mean just like with directx9 installer there should be a flag to not do /quit (re?)install every time, because it is too slow. Or do we need to have latest version of them too every time?
As we don't move the version on too often, mostly its a quick run that reports a return code of 1638 indicating it's not newer than the currently installed version. For me, using an up to date Win 10, this is less than a second.
Obviously if there's a new version to be installed that does take some time.
I'm also running 21H1, I haven't been able to check what happens with the same version as currently I have 14.29.30133 installed and the latest installer I have from my VS installation is 14.29.30036. MS seem to be having difficulties as I can't access their latest VC ++ downloads page to get the newest installer.