Setting box extent to a physics enabled box collision on runtime results in a crash

Steps to reproduce:

1.Create a blueprint with a box collision as a root component and set the extents to 50x50x50.

2.Enable simulate physics for the box.

3.Place the blueprint in the level. (Disable gravity for the box so it doesn’t fall or create a plane with simple collision and place the blueprint on top.)

4.Create a graph to call SetBoxExtent (event tick or on key press) with values other than the original.

5.Press play and the game crashes upon calling SetBoxExtent.

The game crashes only if the box is set to simulate physics.

Hey hurt720-

I followed the steps provided and did not have a crash occur. I tried using an actor blueprint with the box collision. Can you provide the callstack and log files from the crash for additional information.

I’m sorry , it seems I missed a step. You need to add a static mesh as a child of the box collision for the crash to occur. The error message is "Assertion failed: PShapes.Num() == 1 [File:D:\Build++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\Engine\Private\Components\ShapeComponent.cpp] [Line: 135]"link text

Thank you for the additional piece of information. I was able to reproduce the crash and have entered a report for it that you can follow here: Unreal Engine Issues and Bug Tracker (UE-44957) . As a note, there is a warning when setting the box collision component to simulate physics that the Collision Enabled setting is incompatible. Changing this setting for the component to Physics Only or Collision Enabled (Query and Physics) will fix the warning / prevent the crash.

Cheers

Thank you for the quick response! Yes I forgot to set this for the repro project, but in my original project the crash still occurs with the settings you specified.