Hey,
Recently I took a game server trace from the editor, I am setting FNetTrace::SetTraceVerbosity(ENetTraceVerbosity::VeryVerbose); programatically and I encountered this crash. It seems like the code for this was never implemented in the Engine so it just fires a check?
case RouteId_NameEvent:
{
FNetProfilerNameIndexType TraceNameId = EventData.GetValue<FNetProfilerNameIndexType>("NameId");
if (TracedNameIdToNetProfilerNameIdMap.Contains(TraceNameId))
{
// need to update the name
check(false);
}
else
{
FString Name = FTraceAnalyzerUtils::LegacyAttachmentString<UTF8CHAR>("Name", Context);
TracedNameIdToNetProfilerNameIdMap.Add(TraceNameId, NetProfilerProvider.AddNetProfilerName(*Name));
}
}
break;
I made a mod to try and fix this case and it seems to work OK.
Can you advise if this is mod is the correct solution here? It’s pretty annoying to just have Insights crash on you so I’d be happy to take a better fix if there is one as the trace itself generally seems perfectly useable with a lot of useful data.
case RouteId_NameEvent:
{
// <#CCP_MOD>
const FNetProfilerNameIndexType TraceNameId = EventData.GetValue<FNetProfilerNameIndexType>("NameId");
FString Name = FTraceAnalyzerUtils::LegacyAttachmentString<UTF8CHAR>("Name", Context);
if (FNetProfilerNameIndexType* ExistingNameId = TracedNameIdToNetProfilerNameIdMap.Find(TraceNameId))
{
// Name index reused by the traced target (reconnect/new session)”
// register it as a (possibly new) profiler name and repoint the mapping.
*ExistingNameId = NetProfilerProvider.AddNetProfilerName(*Name);
}
else
{
TracedNameIdToNetProfilerNameIdMap.Add(TraceNameId, NetProfilerProvider.AddNetProfilerName(*Name));
}
// </#CCP_MOD>
}
break;
[Attachment Removed]