Destructible Components Cause Crash in FPhysScene::UpdateActiveTransforms

Hi. I’m the programmer on a VR based project that was mostly scripted in blueprint. The game has several destructible puzzles stored in different streaming levels (all levels are at the same coordinates in world space). We are experiencing a seemingly random, but frequent crash in FPhysScene::UpdateActiveTransforms. I noticed in the debugger that the assert ensure(!RigidActor->userData || !FPhysxUserData::IsGarbage(RigidActor->userData)) fires off quite frequently, usually while streaming levels, with RigidActor->userData being garbage. This does not always result in a crash because the next line:

if (FBodyInstance* BodyInstance = FPhysxUserData::Get<FBodyInstance>(RigidActor->userData))

usually results in null. However, there are occasions where it actually resolves to a garbage FBodyInstance and the game crashes. The crash only occurs when playing a packaged build and not while playing in the editor (the assert always occurs).

I believe that I have tracked it down to the DestructibleComponents that we are using. Our blueprint script uses SetDestructibleMesh in the Construction Script. Removing all occurrences of this seems to decrease the occurrence of the assert, but it still reproducible. Since we the blueprint modified, the game is unplayable, I haven’t been able to play enough to reproduce the crash, only the assert.

I’ve tried several modifications of our blueprint scripts to try and track this down to a specific series of blueprint. I am quite confident that it is related to Destructible Objects and level streaming.

Any suggestions on a solution or work around for this issue? Is there a special way to handle cleaning up destructible components prior to level streaming?

Any help would be greatly appreciated.

Thanks,

Andrew

We found that we had a destructible component that had static meshes as children. Removing the static meshes as children from the destructible component eliminated the assert and seems to have fixed our crash. This is a viable work around for us.

Hey Rogue Earth,

I’m glad you found a workaround that you can use.

From the sound of the issue, it was likely confined to your project. If it pops up again, please feel free to post back here to let us know.

Cheers,

TJ