[Cook][UE][Log] LogInit: Display: -----------------------------------
[Cook][UE][Log] LogInit: Display: LogWindows: Error: [CookWorker 1]: appError called: Assertion failed: InWorld != ReferencedWorld [File:D:\xx\Engine\Engine\Source\Runtime\Engine\Private\WorldPartition\WorldPartitionCookPackageSplitter.cpp] [Line: 58]
[Cook][UE][Log] LogWindows: Error: [CookWorker 1]: appError called: Assertion failed: InWorld != ReferencedWorld [File:D:\spAosWeekly_Game\Engine\Engine\Source\Runtime\Engine\Private\WorldPartition\WorldPartitionCookPackageSplitter.cpp] [Line: 58]
[Cook][UE][Log] LogCook: Display: [CookWorker 1]: [Cook] World xx is being cleaned up while still referenced by a package splitter.
Cook一个WC地图,这个地图里面有个世界分区地图的关卡实例,然后Cook关卡实例过程中,触发了这个崩溃,是偶现的,后续发现可以正常Cook结束,想问问既然有这个断言是否有相关排查手段
您好,内部jira上有类似的问题,但是还处于未解决的状态。
排查的话,可以先加上命令-LogCmds=“LogWorld Verbose, LogCookGenerationHelper Verbose, LogLevelInstance Verbose, LogWorldPartition Verbose” 获取更多log
然后添加一些额外信息
void FWorldCookPackageSplitter::OnWorldCleanup(UWorld* InWorld, bool bSessionEnded, bool bCleanupResources)
{
if (InWorld == ReferencedWorld)
{
// Debug: identify who is cleaning up the world referenced by the splitter
UWorld* OwningWorld = (InWorld && InWorld->PersistentLevel) ? InWorld->PersistentLevel->OwningWorld.Get(
UE_LOGF(LogWorldPartition, Error, "[Cook][Debug] Splitter world %ls cleaned up. OwningWorld=%ls bSessionbCleanupResources=%d IsInitialized=%d",
*GetFullNameSafe(InWorld), *GetFullNameSafe(OwningWorld), bSessionEnded, bCleanupResources, InWorld->IsInitialized());
FDebug::DumpStackTraceToLog(ELogVerbosity::Error);
}
ensureAlwaysMsgf(InWorld != ReferencedWorld, TEXT("[Cook] %s is being cleaned up while still referenced by a pacsplitter."), *GetFullNameSafe(InWorld));
}
再在 ReportGenerationManifest 和 Teardown 里各加一行日志,打印 ReferencedWorld 的名字和时间点。这样日志里就能拼出完整的"splitter 持有期间,被谁清理"的时间线。
如果能做一个复现工程发给我们那就最好了
这个不是稳定复现的,我先看看加上日志方便排查