Adding variable to struct causes crash of engine

I’m able to add members to a new struct and other structs, but once struct is used inside some blueprints ability to add to that struct is no longer viable as when you do it causes whole engine to crash. I can save changes to struct on existing members, but can’t add any new ones. I’ve tried to track down exact moment / use case for what’s causing it but have yet been able to pin point it. I first ran into it in 4.7 but tried 4.8 preview 3 to see if some of proposed possible struct fixes were in yet or working or if blueprint improvements solve problem, but no luck yet.

There is an error report spawned every time it happens. I’m thinking it might of started being a problem after I started trying to add it to a save object, but have to do some rolling back to test in more details if that is case.

Hi Keeperofstars,

I’m not sure I have enough information to try to reproduce this internally. So if I create a new struct, what and how do I need to use it in a Blueprint to test this? And where/how are you adding to struct? Dynamically or in struct itself?

Can you also find log from your project after this crash occurs and /attach it here? information from crash reporter dialogue window would be helpful as well. Thanks!

Here is log, crash dump has no information in it. besides machine and epic id.
I think top failure line is key aspect where array index out of bounds 8 from an array of size 8. Note structure has 8 elements in it before I try adding another element to structure via structure user interface.
I can remove an item from struct, and save it no problem. If i do that then try to add another item it becomes 7 out of 7 on array bounds. I’m going to fully rebuild it again from ground up testing each step of way to see if I can reproduce and catch step that is tripping it up.

Assertion failed: (Index >= 0) &
(Index < ArrayNum)
[File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\Core\Public\Containers\Array.h]
[Line: 679] Array index out of
bounds: 8 from an array of size 8

KERNELBASE.dll!UnknownFunction (0x00007ffc265518f8) + 0 bytes [UnknownFile:0]
UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() (0x00007ffc05c38074) + 0 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
link text

Added follow up found issue aspect. So rebuilt my whole project and found root source of bug. Once struct is in use in blueprints, and you move it’s location to a folder path that is not in same top level folder path as it’s current location. It breaks ability to add structure elements at that point. Going to start a clean project and refine test case now. But example of path was /content/character/ that then had sturct bp in it. Then moved it to /content/testfolder/ at that point it broke struct. I just used drag and drop and move to option inside engine.

Thanks for digging into it further! I’m still not able to reproduce this crash, though; moving struct to another folder didn’t cause any issues with adding a new element to it, whether struct was used in another Blueprint or not. If you’re able to refine repro steps for me, that would be greatly appreciated!

Hey Keeperofstars,

We haven’t heard back from you in a while, so I’m resolving this post for tracking purposes. If you’re still experiencing this issue and are able to provide reproduction steps in a new project, please feel free to update us and we’ll continue investigating. Thanks!

Unreal has got a problem of crashing if struct is changed while struct is linked up inside
a FOR LOOP or linked in many FOR LOOPS from different blueprints wherever struct is being used…
Try moving struct into a new folder WHILE struct is running INSIDE OF A FOR LOOP
in one blueprint or is linked up in a dozen blueprints and see if it then misbehaves.

I can confirm this workaround works for now, if you move structure into a new location edit it then move it back it works without crash.
I wish Epic Games had a good QA team, there are so many show stopping bugs that need time consuming workarounds.

Show stopping is right. Time consuming is biggest problem with this engine. It takes a very long time to make a game because of bugs you have to work around in this engine…

I can reproduce this in my project. Open a structure, try to add a new variable. UE4 Immediately crashes.
This structure defines all items in my game, either weapon, consumable, trade good or whatever. There’s like 15 variables currently.

I can reproduce this in my project. Open a structure, try to add a new variable. UE4 Immediately crashes.
This structure defines all items in my game, either weapon, consumable, trade good or whatever. There’s like 15 variables currently.

1 Like

I’m locked out my tutorial because this bug.

UE 5.0.3

Moving around not helping.

Big mistake trying to replace old struct, broke all my project.

gg I guess.

Hey ,

I fixed this in my project by opening every other file which was associated with this struct and saved it. After saving every single file manually I was able to add a new variable to struct.

Seems UE has some serious cleanup problems or something?

I hope this helps you.

1 Like

I managed, but I discovered some weird stuff.

Even by using editor clone/copy stuff new struct disappears from BPs, so process I did was duplicating and manually changing broken BPs.

most dangerous is first time you open a corrupted project, to accept option, because after that project does not open anymore, again I managed to discover opening another file not related managed to trigger corrupted file question again.

Some dangerous points to be checked by team.