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

**URL:** <https://forums.unrealengine.com/t/setting-box-extent-to-a-physics-enabled-box-collision-on-runtime-results-in-a-crash/393164>\
**Category:** World Creation\
**Tags:** box-collision, unreal-engine, Physics, bug-report, question, Blueprint\
**Created:** [May 9, 2017, 8:38pm UTC](https://forums.unrealengine.com/t/setting-box-extent-to-a-physics-enabled-box-collision-on-runtime-results-in-a-crash/393164 "2017-05-09T20:38:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hurt720](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hurt720](https://forums.unrealengine.com/u/hurt720)\
**Post date:** [May 9, 2017, 8:38pm UTC](https://forums.unrealengine.com/t/setting-box-extent-to-a-physics-enabled-box-collision-on-runtime-results-in-a-crash/393164/1 "2017-05-09T20:38:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [May 10, 2017, 3:56pm UTC](https://forums.unrealengine.com/t/setting-box-extent-to-a-physics-enabled-box-collision-on-runtime-results-in-a-crash/393164/2 "2017-05-10T15:56:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hurt720](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hurt720](https://forums.unrealengine.com/u/hurt720)\
**Post date:** [May 12, 2017, 4:50am UTC](https://forums.unrealengine.com/t/setting-box-extent-to-a-physics-enabled-box-collision-on-runtime-results-in-a-crash/393164/3 "2017-05-12T04:50:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [May 12, 2017, 2:17pm UTC](https://forums.unrealengine.com/t/setting-box-extent-to-a-physics-enabled-box-collision-on-runtime-results-in-a-crash/393164/4 "2017-05-12T14:17:46Z")

</div>

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)](https://issues.unrealengine.com/issue/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

---

<div class="post-metadata">

**Author:** ![hurt720](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hurt720](https://forums.unrealengine.com/u/hurt720)\
**Post date:** [May 12, 2017, 10:51pm UTC](https://forums.unrealengine.com/t/setting-box-extent-to-a-physics-enabled-box-collision-on-runtime-results-in-a-crash/393164/5 "2017-05-12T22:51:44Z")

</div>

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.
