RealtimeMeshComponent icon indicating copy to clipboard operation
RealtimeMeshComponent copied to clipboard

Crash on Hide/Show with Instances

Open caseyvan opened this issue 4 years ago • 1 comments

I ran into an odd crash while hiding, then showing two RuntimeMeshComponents that shared a RuntimeMesh. The specific issue was occurring in FRuntimeMeshComponentSceneProxy::CreateMeshBatch because Section.Buffers->VertexFactory was uninitialized. After some digging, it looked like the VertexFactory was being reset due to the reference count of that FRuntimeMeshSectionProxyBuffers instance dropping to zero. This was despite FRuntimeMeshProxy having a pointer to it, and no calls to clear up update that section. It looked to me like a race condition with reference counting, and adding ESPMode::ThreadSafe to FRuntimeMeshSectionProxyBuffers seems to have fixed it. I also noticed that FRuntimeMeshProxy is marked as thread-safe even though the section buffer was not.

caseyvan avatar Mar 29 '21 19:03 caseyvan

Can you make a PR for it ?

Moddingear avatar Apr 14 '21 16:04 Moddingear

Closing as this is now a replaced version of the plugin so previous issues likely won't apply exactly. If you continue to have this issue on the new version, please feel free to reopen!

Thanks!

Koderz avatar Mar 06 '23 15:03 Koderz