# Delegate Crash

**URL:** <https://forums.unrealengine.com/t/delegate-crash/481793>\
**Category:** C++\
**Tags:** crashes, engine-compile, unreal-engine, crash, delegates, CPP, question\
**Created:** [April 15, 2021, 8:31am UTC](https://forums.unrealengine.com/t/delegate-crash/481793 "2021-04-15T08:31:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ACBYTES](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ACBYTES](https://forums.unrealengine.com/u/ACBYTES)\
**Post date:** [April 15, 2021, 8:31am UTC](https://forums.unrealengine.com/t/delegate-crash/481793/1 "2021-04-15T08:31:34Z")

</div>

Hi.  
I have to compile the C++ code for 3-4 times before playing the game to avoid the game from crashing because of an inner problem in the Multicast Delegate and Delegate classes.

```
**Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff

UE4Editor_Engine
UE4Editor_Regret_4754!TBaseFunctorDelegateInstance<void __cdecl(bool),FDefaultDelegateUserPolicy,<lambda_6669d0385390045a3932be9d39625d5c> >::ExecuteIfSafe() [M:\Game Related\UE4\Engine\UE_4.26\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:838]
UE4Editor_Regret_4754!TMulticastDelegate<void __cdecl(bool),FDefaultDelegateUserPolicy>::Broadcast() [M:\Game Related\UE4\Engine\UE_4.26\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:955]
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll**

```

I know my code doesn’t have any problems and I think that Hot-Reloaded objects replace the main object and the multicast delegates get to point to a null delegate. Any opinions on this?

---

<div class="post-metadata">

**Author:** ![Afaneh.Ahmad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Afaneh.Ahmad](https://forums.unrealengine.com/u/Afaneh.Ahmad)\
**Post date:** [October 10, 2021, 5:43am UTC](https://forums.unrealengine.com/t/delegate-crash/481793/2 "2021-10-10T05:43:43Z")

</div>

Did you figure this out , I am having similar issue

---

<div class="post-metadata">

**Author:** ![lehuan5062](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lehuan5062](https://forums.unrealengine.com/u/lehuan5062)\
**Post date:** [December 14, 2022, 9:26am UTC](https://forums.unrealengine.com/t/delegate-crash/481793/3 "2022-12-14T09:26:54Z")

</div>

same here!
