Calling DisableProjection() on a UPhysicsConstraintComponent’s FConstraintInstance causes a crash with the following callstack:
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: === Critical error: ===
[2016.09.26-19.24.11:711][ 0]LogWindows:Error:
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: Fatal error!
[2016.09.26-19.24.11:711][ 0]LogWindows:Error:
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000
[2016.09.26-19.24.11:711][ 0]LogWindows:Error:
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-Engine.dll!FConstraintInstance::DisableProjection() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\physicsengine\constraintinstance.cpp:1235]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-VRArena.dll
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-CoreUObject.dll!UClass::CreateDefaultObject() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2524]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-CoreUObject.dll!UObjectLoadAllCompiledInDefaultProperties() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:745]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-CoreUObject.dll!ProcessNewlyLoadedUObjects() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:830]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-CoreUObject.dll!TBaseStaticDelegateInstance::ExecuteIfSafe() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:1017]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-Core.dll!TBaseMulticastDelegate::Broadcast() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:921]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:461]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-Projects.dll!FModuleDescriptor::LoadModulesForPhase() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\projects\private\moduledescriptor.cpp:398]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor-Projects.dll!FProjectManager::LoadModulesForProject() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\projects\private\projectmanager.cpp:53]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor.exe!FEngineLoop::LoadStartupModules() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2218]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor.exe!FEngineLoop::PreInit() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:1653]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor.exe!GuardedMain() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launch.cpp:117]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor.exe!GuardedMainWrapper() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor.exe!WinMain() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: kernel32.dll
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: ntdll.dll
[2016.09.26-19.24.11:711][ 0]LogWindows:Error: ntdll.dll
[2016.09.26-19.24.11:711][ 0]LogWindows:Error:
[2016.09.26-19.24.11:732][ 0]LogExit: Executing StaticShutdownAfterError
[2016.09.26-19.24.11:734][ 0]LogWindows: FPlatformMisc::RequestExit(1)
[2016.09.26-19.24.11:734][ 0]Log file closed, 09/26/16 15:24:11
That crash is on editor startup if you’re calling DisableProjection() in another actor’s constructor. It also crashes if you call it during gameplay (for example, in BeginPlay()). I’m unaware of any circumstances where this function can be called without causing a crash. This effectively makes it impossible to disable projection on Physics Constraint Components in any setting other than in blueprint (where the bDisableProjection flag can be accessed directly in the CDO. bDisableProjection has been marked as deprecated elsewhere.)