Opened 5 years ago

Closed 4 years ago

#5527 closed defect (fixed)

VS2015 requires Universal C Runtime (CRT)

Reported by: historic_bruno Owned by: Itms
Priority: Release Blocker Milestone: Alpha 24
Component: Build & Packages Keywords:
Cc: Itms Patch:

Description (last modified by historic_bruno)

As explained here, VS 2015 introduces the Universal CRT which is a component of Windows 10. Earlier versions of Windows must install update KB2999226, or the VCRedist package for VC++ 2015 (you already have it if you installed VS 2015). Windows XP users won't get the Windows update, so they must install the VCRedist package.

Another option is "app-local deployment", where we copy all of the UCRT DLLs from the Windows 10 SDK (although I tried this and it failed on XP; copying them from the vcredist package worked), alongside the rest of the game's binaries. There are 41 of them, but it's < 2 MB total:

C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86

api-ms-win-core-console-l1-1-0.dll
api-ms-win-core-datetime-l1-1-0.dll
api-ms-win-core-debug-l1-1-0.dll
api-ms-win-core-errorhandling-l1-1-0.dll
api-ms-win-core-file-l1-1-0.dll
api-ms-win-core-file-l1-2-0.dll
api-ms-win-core-file-l2-1-0.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-heap-l1-1-0.dll
api-ms-win-core-interlocked-l1-1-0.dll
api-ms-win-core-libraryloader-l1-1-0.dll
api-ms-win-core-localization-l1-2-0.dll
api-ms-win-core-memory-l1-1-0.dll
api-ms-win-core-namedpipe-l1-1-0.dll
api-ms-win-core-processenvironment-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-1.dll
api-ms-win-core-profile-l1-1-0.dll
api-ms-win-core-rtlsupport-l1-1-0.dll
api-ms-win-core-string-l1-1-0.dll
api-ms-win-core-synch-l1-1-0.dll
api-ms-win-core-synch-l1-2-0.dll
api-ms-win-core-sysinfo-l1-1-0.dll
api-ms-win-core-timezone-l1-1-0.dll
api-ms-win-core-util-l1-1-0.dll
api-ms-win-crt-conio-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll
api-ms-win-crt-environment-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-multibyte-l1-1-0.dll
api-ms-win-crt-private-l1-1-0.dll
api-ms-win-crt-process-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
ucrtbase.dll

Change History (10)

comment:1 by historic_bruno, 5 years ago

Cc: Itms added

comment:2 by historic_bruno, 5 years ago

Description: modified (diff)

comment:3 by historic_bruno, 5 years ago

Description: modified (diff)

Instant error on startup when using app-local deployment on XP:

.  0  Id: 78c.50c Suspend: 1 Teb: 7ffdd000 Unfrozen
ChildEBP RetAddr  
0012fe40 003abb79 kernel32!RaiseException+0x53
0012fe9c 003ab6a9 MSVCP140!__delayLoadHelper2(struct ImgDelayDescr * pidd = 0x003b4070, <function> ** ppfnIATEntry = 0x003d702c)+0x16c [f:\dd\vctools\delayimp\delayhlp.cpp @ 323]
0012fedc 0038c45f MSVCP140!_tailMerge_CONCRT140_dll+0xd
*** WARNING: Unable to verify checksum for pyrogenesis.exe
0012fee8 004eb99e MSVCP140!_Mtx_init_in_situ(struct _Mtx_internal_imp_t * mtx = 0x007c0d20, int type = 0n2)+0xf [f:\dd\vctools\crt\crtw32\stdcpp\thr\mutex.c @ 44]
0012ff18 004018d8 pyrogenesis!CLogger::CLogger(class std::basic_ostream<char,std::char_traits<char> > * mainLog = 0x007c0c98, class std::basic_ostream<char,std::char_traits<char> > * interestingLog = 0x007c0c98, bool takeOwnership = false, bool useDebugPrintf = true)+0x8e [e:\jenkins\workspace\vs2015_autobuild\source\ps\clogger.cpp @ 83]
0012ff2c 009381cd pyrogenesis!`dynamic initializer for 'nullLogger''(void)+0x18 [e:\jenkins\workspace\vs2015_autobuild\source\ps\clogger.cpp @ 49]
0012ff48 006b4524 ucrtbase!_initterm+0x6d
0012ff8c 00664a3f pyrogenesis!__scrt_common_main_seh(void)+0x7b [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 221]
0012ffc0 7c816037 pyrogenesis!CallStartupWithinTryBlock(void)+0x3f [e:\jenkins\workspace\vs2015_autobuild\source\lib\sysdep\os\win\wseh.cpp @ 365]
0012fff0 00000000 kernel32!BaseProcessStart+0x23

Installing the vcredist _does_ work. The game actually does run nicely on XP, and I was able to connect to the lobby after adding TLS 1.1/1.2 support via a Windows update.

comment:4 by Itms, 5 years ago

Hi Ben, thanks for the information!

Even if those DLLs are light, this is a lot of files... So if it only causes issues for XP users, I would rather just tell XP users to install the redistributables. We are still making efforts to support XP but I think that at this point it's reasonable to ask those (non-numerous) users to install an extra package, rather than bloat our repo.

What do you think?

comment:5 by historic_bruno, 5 years ago

Well the UCRT is required for all pre-10 Windows versions, including 7 and 8/8.1, but it's available as an update. I'm not sure if it's an optional or required update, but probably some users won't have it installed for whatever reason, and the game will fail to run. It's the same logic as including the other VC runtimes, to save the users having to install extra packages.

However, the app-local deployment didn't work on XP, if it works for 7/8.1 then it's a decent argument for including them (or have the installer detect and/or install the VC2015 redist package which will always work).

Last edited 5 years ago by historic_bruno (previous) (diff)

comment:6 by Itms, 5 years ago

After reading the MS blog article you linked in the ticket description, I am wondering whether including ucrtbase.dll and ucrtbased.dll is not enough to cover our needs. Do the extra api-ms DLLs contain something we need?

comment:7 by Itms, 5 years ago

historic_bruno, any idea about those api-ms dlls? I'll try to test on XP and if I can reproduce I'll verify my assumption that only the ucrtbase is needed.

comment:8 by Itms, 4 years ago

In 23305:

Upgrade NVTT to version 2.1.1, fixes #4549.

Windows binaries built with toolset v140_xp.
Tested under Windows, Linux and macOS.
Includes a patch for building on musl Linux, contributed by voroskoi, containing code by leper.
Use the opportunity to set native line endings in the NVTT bundle.

The NVTT DLL was the last one built with VS 2010, refs #5379, #5527.

Differential Revision: https://code.wildfiregames.com/D2475

comment:9 by Itms, 4 years ago

I confirm that adding the extra DLLs or installing the redist package is not needed on an up-to-date fresh install of Win7.

Adding the DLLs work on WinXP (all of them are needed, not just the base), but I think it would be better to ask XP users to install the package.

Upgrading NVTT added a dependency on concrt140.dll, which created a weird crash on my Windows VM. I finally found what the culprit was, so I'm going to commit the missing DLL for that and close this ticket.

comment:10 by Itms, 4 years ago

Owner: set to Itms
Resolution: fixed
Status: newclosed

In 23381:

Commit concrt140.dll, dependency of the new NVTT dll. Fixes #5527, refs #4549 and #5379.

Note: See TracTickets for help on using tickets.