Developer Notes

Issue was user error

Description

Using the AddDynamic macro causes a crash upon opening the project.

Steps to Reproduce

1. Download the attached project.
2. Right-click the .uproject file and select "Generate Project Files".
3. Open the .sln file that is generated. Ensure that Development Editor and Win64 for the build configuration and Compile (ctrl+shift+b) the project.
4. After the compilation is done, open the .uproject file.
Result: The editor crashes upon opening
Expected: The editor opens without any issue

Callstack
UE4Editor_AddDynamic!TArray<TScriptDelegate<FWeakObjectPtr>,FDefaultAllocator>::RemoveAllSwap<<lambda_38374a012a6466a71775a733cc9d8294> >() [c:\program files\epic games\4.9\engine\source\runtime\core\public\containers\array.h:2041]
UE4Editor_AddDynamic!TBaseDynamicMulticastDelegate<FWeakObjectPtr,void,AActor * __ptr64,UPrimitiveComponent * __ptr64,int,bool,FHitResult const & __ptr64>::__Internal_AddDynamic<AMyCharacter>() [c:\program files\epic games\4.9\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:1013]
UE4Editor_AddDynamic!AMyCharacter::AMyCharacter() [c:\users\matthew.clark\documents\unreal projects\real projects\adddynamic\source\adddynamic\mycharacter.cpp:13]
UE4Editor_CoreUObject!UClass::CreateDefaultObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\coreuobject\private\uobject\class.cpp:2657]
UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:729]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:815]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:921]
UE4Editor_Core!TBaseMulticastDelegate<void>::Broadcast() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:809]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\core\private\modules\modulemanager.cpp:426]
UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\projects\private\moduledescriptor.cpp:370]
UE4Editor_Projects!FProjectManager::LoadModulesForProject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\projects\private\projectmanager.cpp:53]
UE4Editor!FEngineLoop::LoadStartupModules() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\launch\private\launchengineloop.cpp:1989]
UE4Editor!FEngineLoop::PreInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\launch\private\launchengineloop.cpp:1495]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\launch\private\launch.cpp:110]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

Have Comments or More Details?

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

0
Login to Vote

Won't Fix
ComponentUE - Gameplay
Affects Versions4.9
CreatedSep 4, 2015
ResolvedSep 5, 2015
UpdatedJul 14, 2021
View Jira Issue