# Hot Reload crashes Editor

**URL:** <https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443>\
**Category:** Getting Started & Setup\
**Tags:** crashes, unreal-engine, UE4-25, crash, Visual-Studio, question, hot-reload\
**Created:** [May 21, 2020, 8:59am UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443 "2020-05-21T08:59:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewVal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AndrewVal](https://forums.unrealengine.com/u/AndrewVal)\
**Post date:** [May 21, 2020, 8:59am UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/1 "2020-05-21T08:59:25Z")

</div>

Since 4.25 HotReload doesn’t work properly. Everytime when I compile a project in Visual Studio or inside UE4 Editor I’ve got a crash with the following CallStack and Exception

_Unhandled exception at 0x00007FF9AC0F0DA8 (UE4Editor-CoreUObject.dll) in UE4Minidump.dmp: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. occurred_

> [Inline Frame] UE4Editor-CoreUObject.dll!FField::HasAnyCastFlags(const unsigned \_\_int64) Line 499 C++  
> [Inline Frame] UE4Editor-CoreUObject.dll!CastField(FField \*) Line 796 C++  
> [Inline Frame] UE4Editor-CoreUObject.dll!TFieldPath::{ctor}(FField \* InProperty, TFieldPath::EDummy1) Line 325 C++  
> UE4Editor-CoreUObject.dll!FPropertyProxyArchive::operator\<\<(FField \* & Value) Line 45 C++  
> [Inline Frame] UE4Editor-CoreUObject.dll!operator\<\<(FArchive &) Line 93 C++  
> UE4Editor-CoreUObject.dll!UStruct::SerializeExpr(int & iCode, FArchive & Ar) Line 222 C++  
> UE4Editor-CoreUObject.dll!UStruct::SerializeExpr(int & iCode, FArchive & Ar) Line 314 C++  
> UE4Editor-CoreUObject.dll!UStruct::Serialize(FArchive & Ar) Line 1925 C++  
> UE4Editor-CoreUObject.dll!UFunction::Serialize(FArchive & Ar) Line 5555 C++  
> [Inline Frame] UE4Editor-HotReload.dll!FHotReloadModule::ReplaceReferencesToReconstructedCDOs::\_\_l2::FFindRefTask::DoWork() Line 983 C++  
> UE4Editor-HotReload.dll!FAsyncTask\<`FHotReloadModule::ReplaceReferencesToReconstructedCDOs'::`2’::FFindRefTask\>::DoWork() Line 271 C++  
> UE4Editor-HotReload.dll!FAsyncTask\<`FHotReloadModule::ReplaceReferencesToReconstructedCDOs'::`2’::FFindRefTask\>::DoThreadedWork() Line 296 C++  
> UE4Editor-Core.dll!FQueuedThread::Run() Line 855 C++  
> UE4Editor-Core.dll!FRunnableThreadWin::Run() Line 86 C++  
> UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() Line 35 C++

---

<div class="post-metadata">

**Author:** ![Prashast](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Prashast](https://forums.unrealengine.com/u/Prashast)\
**Post date:** [June 17, 2020, 10:38pm UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/2 "2020-06-17T22:38:39Z")

</div>

I am getting the same error since upgrading to 4.25.1 with the same call stack. If you want to try to troubleshoot this with me here’s my company Discord: [PARIAH](https://discord.gg/SXGJmpQ)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [June 19, 2020, 8:54am UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/3 "2020-06-19T08:54:56Z")

</div>

Did you get anywhere with this? I’m getting the same crash, 4.25, when compiling blueprints in editor…

---

<div class="post-metadata">

**Author:** ![Squeaky-Bed](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Squeaky-Bed](https://forums.unrealengine.com/u/Squeaky-Bed)\
**Post date:** [July 6, 2020, 2:22pm UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/4 "2020-07-06T14:22:06Z")

</div>

Same here, I am looking for an answer to this.

---

<div class="post-metadata">

**Author:** ![MWTAHM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MWTAHM](https://forums.unrealengine.com/u/MWTAHM)\
**Post date:** [July 17, 2020, 6:14pm UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/5 "2020-07-17T18:14:40Z")

</div>

Same s\*\*\* here

---

<div class="post-metadata">

**Author:** ![lyonb96](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lyonb96](https://forums.unrealengine.com/u/lyonb96)\
**Post date:** [August 6, 2020, 7:03am UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/6 "2020-08-06T07:03:40Z")

</div>

Different callstack but same issue for me. About a third of all hot-reloads from Visual Studio crash the editor. 4.25 has been absolute hell for me, the editor crashes far more often than it did in 4.24.

---

<div class="post-metadata">

**Author:** ![Nazruden](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nazruden](https://forums.unrealengine.com/u/Nazruden)\
**Post date:** [August 11, 2020, 8:46am UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/7 "2020-08-11T08:46:16Z")

</div>

Exact same error for me, all the time. Don’t know what’s going on…

---

<div class="post-metadata">

**Author:** ![bengoog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bengoog](https://forums.unrealengine.com/u/bengoog)\
**Post date:** [October 9, 2020, 3:18pm UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/8 "2020-10-09T15:18:37Z")

</div>

This started happening on our team when we switched to 4.25 as well.

---

<div class="post-metadata">

**Author:** ![bengoog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bengoog](https://forums.unrealengine.com/u/bengoog)\
**Post date:** [October 9, 2020, 4:51pm UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/9 "2020-10-09T16:51:20Z")

</div>

For our project, this was caused by doing the following in an Actor’s constructor:

```
FSoftClassPath ClassReference = ...
UClass* MyClass = ClassReference.ResolveClass();
if (!MyClass)
{
    MyClass = ClassReference.TryLoadClass<AMyClass>();
}

```

Protecting this code with

```
if (!HasAnyFlags(RF_ClassDefaultObject))

```

solved the hot reloading issue.

---

<div class="post-metadata">

**Author:** ![PatrikAutomatic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PatrikAutomatic](https://forums.unrealengine.com/u/PatrikAutomatic)\
**Post date:** [December 17, 2020, 7:44am UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/10 "2020-12-17T07:44:18Z")

</div>

Same issue in 4.26

---

<div class="post-metadata">

**Author:** ![Alakuloinen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alakuloinen](https://forums.unrealengine.com/u/Alakuloinen)\
**Post date:** [April 3, 2021, 4:20pm UTC](https://forums.unrealengine.com/t/hot-reload-crashes-editor/465443/11 "2021-04-03T16:20:26Z")

</div>

The bengoog’s answer really points to the right side. I’d add a more general assumption: any complicated stuff in U- and A- classes’ constructors should be relocated to other functions or protected like in the unswer above. In my case a similar crash was caused by a TArray::SetNum() + elements initializing in a constructor. So the main problem is to keep in mind all your subclasses and go through them all.
