# Add variable to structure make crash

**URL:** <https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, crash, question, Blueprint\
**Created:** [March 21, 2023, 10:24am UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564 "2023-03-21T10:24:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![duduskwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@duduskwood](https://forums.unrealengine.com/u/duduskwood)\
**Post date:** [March 21, 2023, 10:24am UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564/1 "2023-03-21T10:24:30Z")

</div>

Hi !

I actually have a strange problem …

I work with BluePrint and i have a structure, which is …

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/0/0409b5cd60b0c7958da149bbc6dfcad896222a93.png)

Today, i’d like to add a variable, which is an other structure 🙂

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/0/a309b78e083f25afb6c9a7bc7d5f6788ec346f3f.png)

This one. So, i just added the variable like this :

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/7/347f37ac2a7854e53232204427c88830d3b1feff.png)

And when i saved and launch my game to check, i got all my BluePrint ‘ **failed to compile** ’…  
Some of BP has

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/a/98a825c1afda9b7f62031719dc2806b292415047.png)  
some variable which disappear…

Thanks to me, i saved my work on GitHub and i can backup my project but i’ve tried multiple times and i don’t understand why it’s happening ☹

Thanks to everyone which answer me !

---

<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:** [March 21, 2023, 10:36am UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564/2 "2023-03-21T10:36:06Z")

</div>

I find UE is very finickey around structures.

When you first change the structure, you’ll get an update warning, bottom right

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/0/9704bf342b491ba4b3020bb70298acc31fe8a5d3.jpeg)

for all the other BP items that use this structure. I’d click it and save, then exit.

It _should_ be ok when you restart the editor. But I have found that changing structures and just carrying on will lead to a crash.

Good that you backed up 😉

---

<div class="post-metadata">

**Author:** ![duduskwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@duduskwood](https://forums.unrealengine.com/u/duduskwood)\
**Post date:** [March 21, 2023, 10:51am UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564/3 "2023-03-21T10:51:07Z")

</div>

Hi !

Thanks for your answer, and rapid answer !

So, just tried but all my BP broke again ☹

Same problem ☹

Does i have to save one file by one file ?

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/c/7ec9e7dff5e0c81472440f068a790e69e15b3096.png)

I’ve seen when i add a variable which is not a custom structure, following your trick, it’s work without any problems … But when change it to my custom structure that broke 🤣

---

<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:** [March 21, 2023, 11:15am UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564/4 "2023-03-21T11:15:06Z")

</div>

Yes, it can’t handle nested structures, apparently… ☹

---

<div class="post-metadata">

**Author:** ![duduskwood](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@duduskwood](https://forums.unrealengine.com/u/duduskwood)\
**Post date:** [March 21, 2023, 11:19am UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564/5 "2023-03-21T11:19:15Z")

</div>

Oh ! I’ve found a solution, strange solution 🤣

So … Modify structure, add the new structure :

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/4/8/04816be0cd5173f7810c4d2cc6fff7d42ce71fdb.png)

Now, save ONLY the structure

Close UnrealEngine, **discard any other BP changes**

Re-Open UE5 and that’s work 😐

Don’t understand, but it’s ok 🤣

So thanks for your answer ! and your answer time, i appreciate a lot ! 🙂

Have a nice day

---

<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:** [March 21, 2023, 11:33am UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564/6 "2023-03-21T11:33:24Z")

</div>

Or that! 😃

---

<div class="post-metadata">

**Author:** ![FAKlR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/faklr/32/677053_2.png) [@FAKlR](https://forums.unrealengine.com/u/FAKlR)\
**Post date:** [July 8, 2023, 3:18am UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564/7 "2023-07-08T03:18:32Z")

</div>

Thanks you : i thought i had lost 10 days of work because of this bug . I hope they will resolve this .

Edit : for me its inconsistant the first time it worked , then tried on another struct and this problems happened despite not saving others actors .

So it force me to roll back on ue4 and loosing 10 days of works ☹

---

<div class="post-metadata">

**Author:** ![Lukash4k1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lukash4k1](https://forums.unrealengine.com/u/Lukash4k1)\
**Post date:** [August 5, 2025, 7:18pm UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564/8 "2025-08-05T19:18:25Z")

</div>

**Hello there, I know this is marked as “Resolved” and it’s been two years, but I had the same issue today. I tried your solution, but unfortunately, it didn’t help at all.**

I mean, I could revert commits even further back, but that would cost me about a full day of work — so I decided to investigate what actually happened.  
I’m not 100% sure yet, but it looks like I managed to fix the problem… so… yeah.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/1/e/61e3e13b99442c1c64dff2ac8e2c9ec73e263d7c.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/c/7ec3d8eeccc426ce81403720963a540db2dbc1cb.png)

I finished my stat system about a week ago and had no issues. I created a similar structure for my card system — also without problems. But when I started working with Monsters and added a hard reference to a Monster class inside a structure, that’s when the problems began. I didn’t notice anything immediately, but the next day, when I tried adding another variable to that structure, the engine crashed.

Even after reverting commits, the crash still occurred — until I opened the Reference Viewer and removed the hard references. After that, everything started working normally again.

I hope this helps someone get rid of the crashes.

EDIT:  
So I tried to reproduce this crash — and I got it. I simply created a hard reference again (by setting the reference in the default settings of `S_SingleMonster`), and then added it in `S_MonsterList` — and boom, crash. Now I can’t even start the project.

---

<div class="post-metadata">

**Author:** ![Lukash4k1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lukash4k1](https://forums.unrealengine.com/u/Lukash4k1)\
**Post date:** [August 8, 2025, 3:58pm UTC](https://forums.unrealengine.com/t/add-variable-to-structure-make-crash/795564/9 "2025-08-08T15:58:07Z")

</div>

Soo it helped me, but i read more about it, and the best solution to prevent it, its just → File / Refresh all node, when u change something with structure, and just restart engine (just in case)
