Live Coding warnings after VS Community 2019 update to version 16.10.1

Greetings everybody!

After recent Visual Studio update, Live Coding started showing weird (at least to me) warning messages.
The warnings are:

Registered process G:\Projects_UE4\UE4DevKit\Engine\Binaries\Win64\UE4Editor-Win64-DebugGame.exe (PID: 4036)

Loading module G:\Projects_UE4\Juggle\Binaries\Win64\UE4Editor-Juggle-Win64-DebugGame.dll (0.394 MB)

Non-unique symbol _volmd found in COFF file G:\Projects_UE4\Juggle\Intermediate\Build\Win64\UE4Editor\DebugGame\Juggle\GameResultWidget.cpp.obj. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)
Non-unique symbol _volmd found in COFF file G:\Projects_UE4\Juggle\Intermediate\Build\Win64\UE4Editor\DebugGame\Juggle\GameResultWidget.cpp.obj. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)

Non-unique symbol _volmd found in COFF file G:\Projects_UE4\Juggle\Intermediate\Build\Win64\UE4Editor\DebugGame\Juggle\GameResultWidget.cpp.obj. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)

Non-unique symbol _volmd found in COFF file G:\Projects_UE4\UE4DevKit\Engine\Intermediate\Build\Win64\UE4Editor\Development\Engine\SharedPCH.Engine.NonOptimized.ShadowErrors.h.obj. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)
Loaded 1 module(s) (0.000s, 24 translation units)
Live coding ready - Save changes and press Ctrl+Alt+F11 to re-compile code

Anyone knows how to ā€œfixā€ this?

Thanks in advance.

Best regards!

3 Likes

Same issue here. Epic have made a fix in the UE5 branch, but nothing in UE4 yet AFAIK

https://github.com/EpicGames/UnrealEngine/commit/39b145baa5678067c20c4b9bba7e882c8f54ac78#diff-485472b49838dc6f0f0aea154b208a27a9024e5dd4c0ff48b7bc1f1d2900ef7a

7 Likes

It doesnā€™t work :frowning:
Is there any solution?

Um hello epic? This is a critical issue, live coding is now broken. Why is there nothing in the 4.27 branch and no hotfix for 4.26 yet? Fixing it for UE5 is completely useless.

Live coding still works just fine for me, though it has been annoying with those warning messages. Has been like that for two VS releases now.

hey @TheJamsh thanks for the link, looks like that should apply cleanly to the existing code, just offset by about 150 lines or so. . . . maybe not entirely cleanly, the newer version uses ā€œobjFileā€ as the file and the current version uses ā€œfileā€. but, anyway, yeah, it applies, and works. and all it does is just prevent the warnings, so there isnā€™t any breakage in live coding without it, just an annoying several hundred warnings :slight_smile:

Once you apply this change, then rebuild Programs->LiveCodingConsole

1 Like

If you build the engine yourself you can adjust the fix to also work for UE4
in LC_Coff.cpp:1348 change
from

LC_WARNING_USER("Non-unique symbol %s found in COFF file %s. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)",
symbolName.c_str(), file->filename.c_str());

to

// BEGIN EPIC MOD - Import
// [CL 16621980 by Tim Smith in ue5-main branch]
// VS2019 seems to generate duplicate unwind and pdata block for the "dynamic atexit destructor" method (__F) under some conditions that I can't determine.
// Also, do not generate warnings for symbols in COMDATs
if (!coffDetail::IsComdatSection(section))
{
	if (!string::StartsWith(symbolName.c_str(), "$unwind$??__F") &&
		!string::StartsWith(symbolName.c_str(), "$pdata$??__F"))
	{
		LC_WARNING_USER("yeah yeah Non-unique symbol %s found in COFF file %s. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)",
			symbolName.c_str(), file->filename.c_str());
	}
	else
	{
		LC_LOG_USER("Non-unique at-exit symbol %s found in COFF file %s. These sometimes appear in debug builds",
			symbolName.c_str(), file->filename.c_str());
	}
}

you will also need to build the LiveCodingConsole Project in the UE4 engine source
to get a new LiveCodingConsole.exe

1 Like

WOW! thank you. iā€™ve never thought REBUILD LiveCodingConsole. and also thanks to inform UE4 use ā€˜fileā€™ as local variable.

yeaaaah took me a while to realize LiveServer was built via LiveCodingConsole :smiley:

Is this a Visual Studio bug or an Unreal Engine bug? Does anyone know what version was the last good VS version before this started happening?

it looks like itā€™s just a pile of new messages from VS 16.10. 16.9 does not do it. The ā€œfixā€ seems to be ignore them. I donā€™t know if thatā€™s 100% correct, but itā€™s what Epic implemented, and it WFM. :smiley:

To be clear, the patch linked wonā€™t fix the warnings generated for _volmd which is what the OP was asking about. Youā€™ll need to add !string::StartsWith(symbolName.c_str(), "_volmd") to exclude them specifically.

1 Like

ā€¦ it did for meā€¦

Just had some fun building a new custom engine build from 4.27.2 and the things to change to get rid of the _volmd found in COFF warnings changed a little bit.

Epic migrated some of the changes from the UE5 engine to UE4 so the thing missing is to wrap

									if (!string::StartsWith(symbolName.c_str(), "$unwind$??__F") &&
										!string::StartsWith(symbolName.c_str(), "$pdata$??__F"))
									{
										LC_WARNING_USER("Non-unique symbol %s found in COFF file %s. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)",
											symbolName.c_str(), file->filename.c_str());
									}
									else
									{
										LC_LOG_USER("Non-unique at-exit symbol %s found in COFF file %s. These sometimes appear in debug builds",
											symbolName.c_str(), file->filename.c_str());
									}

with

							// Also, do not generate warnings for symbols in COMDATs
							if (!coffDetail::IsComdatSection(section))
							{

							}

resulting in

						auto insertIterator = uniqueStaticDataSymbols.emplace(name, static_cast<uint16_t>(0u));
						if (insertIterator.second == false)
						{
							// the name of this symbol is not unique, inform the user.
							// when compiling with control-flow guard (CFG), the compiler will generate
							// non-unique __guard_fids__ symbols - ignore those.
							const ImmutableString& symbolName = GetSymbolName(stringTable, symbol);
							if (!string::Matches(symbolName.c_str(), "__guard_fids__"))
							{
								// BEGIN EPIC MOD
								// VS2019 seems to generate duplicate unwind and pdata block for the "dynamic atexit destructor" method (__F) under some conditions that I can't determine.
								// Also, do not generate warnings for symbols in COMDATs
								if (!coffDetail::IsComdatSection(section))
								{
									if (!string::StartsWith(symbolName.c_str(), "$unwind$??__F") &&
										!string::StartsWith(symbolName.c_str(), "$pdata$??__F"))
									{
										LC_WARNING_USER("Non-unique symbol %s found in COFF file %s. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)",
											symbolName.c_str(), file->filename.c_str());
									}
									else
									{
										LC_LOG_USER("Non-unique at-exit symbol %s found in COFF file %s. These sometimes appear in debug builds",
											symbolName.c_str(), file->filename.c_str());
									}
								}
								// END EPIC MOD
							}

still all in LC_Coff.cpp
you will also need to build the LiveCodingConsole Project in the UE4 engine source
to get a new LiveCodingConsole.exe

2 Likes

Instead of all these over engineered checks, you can also just comment out the logs and move on.

The slow part is it logging things. Because of course, something as trivial as dumping a line to the log is insanely slow in Unreal.

Unnecessary logging has been a significant performance issue in software for decades.

Itā€™s not really a performance issue here, though, itā€™s just annoying.

When reloading engine modules, these warnings printed several hundred thousand times for me, causing it to stuck for minutes. So I just removed them.

This worked for me as well, just want to add that if you work in DebugGame Editor configuration like me, be sure to build LiveCodingConsole using Development Editor configuration.