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
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.
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
Once you apply this change, then rebuild Programs->LiveCodingConsole
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
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.
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.
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
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.