check(Resources->PersistentHash != NANITE_INVALID_PERSISTENT_HASH);

当FGeometryCollectionRenderData里有nanite数据的时候,会先ReleaseResources,然后NaniteResourcesPtr->InitResources(&Owner); [Image Removed]

<br/>

在void FStreamingManager::Remove里会执行Resources->PersistentHash = NANITE_INVALID_PERSISTENT_HASH;但是这个操作是异步的

[Image Removed]

接下来执行Init,这也是异步的

[Image Removed]

问题在于,有时候,会发生如下情况:先执行游戏线程里的PersistentHash = FMath::Max(FCrc::StrCrc32<TCHAR>(*Owner->GetName()), 1u);RHI线程刚好执行到Remove操作的Resources->PersistentHash = NANITE_INVALID_PERSISTENT_HASH;接下来会执行到RHI线程里的Init操作的check(Resources->PersistentHash != NANITE_INVALID_PERSISTENT_HASH);从而导致崩溃。我看了5.7的引擎代码依旧没有修复。官方是否已知这个问题? [Image Removed]

[Attachment Removed]

您好,如wechat沟通,可以使用如下修改:

const uint32 NewHash = FMath::Max(FCrc::StrCrc32<TCHAR>(*Owner->GetName()), 1u);

ENQUEUE_RENDER_COMMAND(InitNaniteResources)(

[this, NewHash](FRHICommandListImmediate&)

{

PersistentHash = NewHash;

GStreamingManager.Add(this);

});

[Attachment Removed]