Description

Calling Add Angular Impulse on BeginPlay causes the editor to crash.

Workaround:
Adding a short (.01s) delay after BeginPlay prevents the crash.

Regression:
No, crash occurs in 4.11.2 as well.

Steps to Reproduce
  1. Open UE4 Editor (with starter content)
  2. Find 1M_Cube asset and right click->Create Destructible Mesh (1M_Cube_DM)
  3. Add instanced of (1M_Cube_DM) to the level and set Simulate Physics to true
  4. Add reference to 1M_Cube_DM to the level blueprint
  5. Pull off of reference node and add AddAngularImpulse node
  6. Add Event BeginPlay node and wire into AddAngularImpulse node
  7. PIE

Result:
Editor will crash immediately after pressing PIE

Expected:
Destructible mesh has impulse applied once when the game starts

Callstack
MachineId:9FA88CA44B7C623122B0039D6C8BA1B0
EpicAccountId:67b2dfbf573f4ca89257ae6f4e56a46c

Access violation - code c0000005 (first/second chance not available)

PhysX3PROFILE_x64!physx::Scb::Body::addSpatialVelocity() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\buffering\scbbody.h:521]
PhysX3PROFILE_x64!physx::NpRigidBodyTemplate<physx::PxRigidDynamic>::addSpatialForce() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\nprigidbodytemplate.h:358]
PhysX3PROFILE_x64!physx::NpRigidDynamic::addTorque() [d:\ori.cohen_g6217_physics\engine\source\thirdparty\physx\physx-3.3\source\physx\src\nprigiddynamic.cpp:308]
UE4Editor_Engine!FPhysXSupport<1>::ExecuteOnPxRigidBodyReadWrite<<lambda_549e9d6e2928fdbd01e64e842129779b> >() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\public\physxpublic.h:247]
UE4Editor_Engine!FBodyInstance::AddAngularImpulse() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\physicsengine\bodyinstance.cpp:3808]
UE4Editor_Engine!UPrimitiveComponent::AddAngularImpulse() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\primitivecomponentphysics.cpp:228]
UE4Editor_Engine!UPrimitiveComponent::execAddAngularImpulse() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\classes\components\primitivecomponent.h:107]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:5077]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:641]
UE4Editor_CoreUObject!UObject::execVirtualFunction() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2166]
UE4Editor_CoreUObject!UObject::ProcessContextOpcode() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2060]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:866]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:765]
UE4Editor_CoreUObject!UObject::execVirtualFunction() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:2166]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:866]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:5077]
UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1245]
UE4Editor_Engine!AActor::ProcessEvent() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\actor.cpp:639]
UE4Editor_Engine!AActor::BeginPlay() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\actor.cpp:2994]
UE4Editor_Engine!AWorldSettings::NotifyBeginPlay() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\worldsettings.cpp:164]
UE4Editor_Engine!AGameMode::HandleMatchHasStarted() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\gamemode.cpp:623]
UE4Editor_Engine!AGameMode::SetMatchState() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\gamemode.cpp:733]
UE4Editor_Engine!AGameMode::StartMatch() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\gamemode.cpp:600]
UE4Editor_Engine!UWorld::BeginPlay() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\world.cpp:3218]
UE4Editor_Engine!UGameInstance::StartPIEGameInstance() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\engine\private\gameinstance.cpp:293]
UE4Editor_UnrealEd!UEditorEngine::CreatePIEGameInstance() [d:\build\++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\playlevel.cpp:3250]
UE4Editor_UnrealEd!UEditorEngine::PlayInEditor() [d:\build\++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\playlevel.cpp:2346]
UE4Editor_UnrealEd!UEditorEngine::StartQueuedPlayMapRequest() [d:\build\++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\playlevel.cpp:1103]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1246]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build\++ue4+release-4.12+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:368]
UE4Editor!FEngineLoop::Tick() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2775]
UE4Editor!GuardedMain() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\launch.cpp:148]
UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Simulation - Physics
Affects Versions4.12.4
Target Fix4.13
Fix Commit3068733
Main Commit3092051
Release Commit3068733
CreatedJun 29, 2016
ResolvedJul 28, 2016
UpdatedApr 27, 2018
View Jira Issue