check(false) in TraceServices::FNetTraceAnalyzer::OnEvent (NetTraceAnalyzer.cpp)

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]

Hi,

Thank you for the report. Unfortunately, in my own test project I’ve been unable to reproduce this check being hit when programmatically setting the Net Trace verbosity.

To get a better idea of the problem, could you provide some more information on your setup and how to reproduce the issue?

Thanks,

Alex

[Attachment Removed]

Unfortunately, not really, all I was really doing was…

  • Run under one process
  • Play as client
  • Perform PIE
  • Use a console command to programatically start profiling for timing and network
  • Then load the .utrace in Insights and it crashes at that check(false)

I could provide you with a broken trace file if that is of any use?

[Attachment Removed]

Hi,

If you’re able to provide a broken trace file, that may be helpful in reproducing the check and creating an issue for this.

Thanks,

Alex

[Attachment Removed]