Physics Substep causing crash

After enabling physics substeps in Project settings: Max Substep Delta Time: 0.007000, Max Substep: 6, I’m starting to get random crashes at the same line:

PxRigidBody* FBodyInstance::GetPxRigidBody_AssumesLocked() const
{
	// The logic below works because dynamic actors are non-NULL in only one scene.
	// If this assumption changes, the logic needs to change.
	PxRigidActor* RigidActor = RigidActorSync ? RigidActorSync : RigidActorAsync;
	return RigidActor ? RigidActor->is<PxRigidBody>() : nullptr;
}

Since the crash occur at the last line: return RigidActor ? RigidActor->is() : nullptr;

I suspect the variable RigidActor is invalid for some reason?

Can Epic staff confirm whether this is a bug or not? And how can I fix this issue?

Thank you.

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

Hi,

After some testing, I found out this random crash only occurs when I apply force to destructible actors. Since the code is checking for validity of RigidActorAsync, I suspect it has something to do with destructible/debris physics.

So I turn on Project Settings > Physics > Enable Async Scene

after that, I didn’t get the same crashes for 1 week, I’ll see if this really fix the issue and report back.