# \[4.15\] DataTable, recompile and hotreload bug

**URL:** <https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141>\
**Category:** C++\
**Tags:** Struct, bug, data-table, unreal-engine, CPP, question, hot-reload\
**Created:** [March 16, 2017, 9:03pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141 "2017-03-16T21:03:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sveitar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sveitar/32/710746_2.png) [@Sveitar](https://forums.unrealengine.com/u/Sveitar)\
**Post date:** [March 16, 2017, 9:03pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/1 "2017-03-16T21:03:06Z")

</div>

I added two new properties to my table row struct in C++ and then compiled using hot-reload.  
The two new properties were not showing on my datatable editor so I restarted the editor.  
Once I restarted the editor I found out that my data table asset is now corrupt, it’s trying to reference a hotreloaded struct as the row struct for the datatable when it should reference my “standard” struct, so all my table data is lost.  
For some reason the editor saved the hotreloaded row struct as the row struct reference for the data table asset.

Screenshot:

 ![130348-ue4editor_2017-03-16_17-56-57.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/4/c/d4ca13f6191f4cce64a5fea8e41d5356ea448b66.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8d6a763f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8d6a763f](https://forums.unrealengine.com/u/anonymous_user_8d6a763f)\
**Post date:** [March 17, 2017, 10:45am UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/2 "2017-03-17T10:45:30Z")

</div>

Hey Sveitar,  
I ran into a similar issue with data assets in 4.12. Did you save your data table before hot reloading, or were there unsaved changes? I think unsaved changes during hot reload could be the culprit here.

---

<div class="post-metadata">

**Author:** ![Sveitar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sveitar/32/710746_2.png) [@Sveitar](https://forums.unrealengine.com/u/Sveitar)\
**Post date:** [March 17, 2017, 6:40pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/3 "2017-03-17T18:40:24Z")

</div>

I always tend to save before playing in editor, so yes, I’m almost sure that I saved before hot reloading. Either way it should be fixed. The engine should never save that HOTRELOADED reference into the asset.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [March 22, 2017, 7:58pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/4 "2017-03-22T19:58:57Z")

</div>

Hey Sveitar-

What class does your struct exist in? Can you provide the code for your struct and repro steps to help me reproduce the issue on my end?

---

<div class="post-metadata">

**Author:** ![Sveitar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sveitar/32/710746_2.png) [@Sveitar](https://forums.unrealengine.com/u/Sveitar)\
**Post date:** [March 23, 2017, 2:52am UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/5 "2017-03-23T02:52:18Z")

</div>

Hi !

The struct is inside of its own header file, the code is attached.

I didn’t experience the issue again, but the steps are pretty much what I said in the first post. As I remember I added two properties and hot reloaded the project from editor.  
Let me know if I can help you with anything.

Thanks!  
link text

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [March 28, 2017, 5:32pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/6 "2017-03-28T17:32:56Z")

</div>

Hey Sveitar-

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here [Unreal Engine Issues and Bug Tracker (UE-43408)](https://issues.unrealengine.com/issue/UE-43408) . You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_de26e41c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_de26e41c1](https://forums.unrealengine.com/u/anonymous_user_de26e41c1)\
**Post date:** [May 3, 2019, 2:30pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/7 "2019-05-03T14:30:33Z")

</div>

We now have version 4.22.1 and it is still not fixed -.-

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0436203c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0436203c](https://forums.unrealengine.com/u/anonymous_user_0436203c)\
**Post date:** [July 16, 2019, 2:30am UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/8 "2019-07-16T02:30:36Z")

</div>

I think this bug is a serious issue.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bc11b0fd1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bc11b0fd1](https://forums.unrealengine.com/u/anonymous_user_bc11b0fd1)\
**Post date:** [September 27, 2022, 11:48pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/9 "2022-09-27T23:48:13Z")

</div>

issue is still present on unreal 5.0.3, same steps to reproduce as mentioned in report UE-43408

the way for this issue not to happen and break a lot of stuff is to close the unreal editor, compile the code with the changes using VS or the tool of your preference, and then reopen the editor to see the changes…

it’s really sad to have to open and close the unreal editor just because you wanted a new member in the struct, for large projects this could be a big time waster

---

<div class="post-metadata">

**Author:** ![Dylan\_RRC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dylan\_RRC](https://forums.unrealengine.com/u/Dylan_RRC)\
**Post date:** [November 11, 2022, 5:26am UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/10 "2022-11-11T05:26:51Z")

</div>

Hi, I just wanted to poke this as I am having a similar error. I only noticed it recently and I am working with UDataAssets so perhaps it is related to that? Blueprint node references break stating garbled HOTRELOADED object types. Resetting editor helps but it has been happening very often. Any suggestions or things I might be missing when working with DataAssets?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bc11b0fd1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bc11b0fd1](https://forums.unrealengine.com/u/anonymous_user_bc11b0fd1)\
**Post date:** [November 18, 2022, 4:27pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/11 "2022-11-18T16:27:19Z")

</div>

if you’re working with data assets and C++, i’d suggest that after any API changes to your custom assets or structs that are used, you first build the project with the editor closed, Hot Reloading causes a lot of issues on that front

we never hot reload our project, as any compilation done that way is temporary and you have to hot reload each time if you don’t compile your source code outside the editor

this issue is pretty annoying to say the least tho

---

<div class="post-metadata">

**Author:** ![Dylan\_RRC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dylan\_RRC](https://forums.unrealengine.com/u/Dylan_RRC)\
**Post date:** [January 25, 2023, 6:34pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/12 "2023-01-25T18:34:09Z")

</div>

Thanks for the insight. I agree, pretty annoying to deal with.

---

<div class="post-metadata">

**Author:** ![WellingOne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WellingOne](https://forums.unrealengine.com/u/WellingOne)\
**Post date:** [November 26, 2024, 5:21pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141/13 "2024-11-26T17:21:14Z")

</div>

ue5.4 still bug  
Once change row structure in c++, don’t change any row of datatable ,once changed all data will lost .  
The best way to avoid this bug is :

1. Export csv;
2. Backup datatable
3. Close editor
4. Change struct
5. Finally compile
