How can I solve this problem?

I’m building an inventory system and naturally need to use a struct. However, while trying to add a variable to it normally, I added it, changed its name, pressed enter, but the editor froze. I closed and restarted the editor. When I tried to change the variable name again, it gave an error. I opened it again, and this time I was able to change the variable name and data type. However, when I tried to save all, it gave an error. I asked ChatGPT for help. They offered a few solutions, but none worked. Finally, they suggested creating a new struct and replacing the existing structs with the new one. I did that. It worked fine for about two hours, but then when I tried to add another variable to the struct, the same error started again. What could be the solution? I’m including the current error code below; maybe it will help.

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff

UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Kismet
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Kismet
UnrealEditor_Kismet
UnrealEditor_Kismet
UnrealEditor_UnrealEd
UnrealEditor_KismetCompiler
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_KismetCompiler
UnrealEditor_KismetCompiler
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_Kismet
UnrealEditor_Kismet
UnrealEditor_KismetWidgets
UnrealEditor_KismetWidgets
UnrealEditor_KismetWidgets
UnrealEditor_KismetWidgets
UnrealEditor_KismetWidgets
UnrealEditor_KismetWidgets
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
user32
user32
UnrealEditor_ApplicationCore
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

first things first: EXCEPTION_ACCESS_VIOLATION means that something somewhere is attempting to read from a pointer that either did exist at some point but doesn’t anymore, or never existed in the first place.
typically the fix for UObject Stuff to check agains IsValid (in Blueprints the one with the question mark has the branch built in)
if it is a raw pointer in C++ check against null

a good rule of thumb if the pointer (or reference in Blueprints) is not the object itself, and it could stop existing for any reason check that it IsValid() before reading from it or writing to it.

can you show the DataTypes of the Members for your struct? my guess is that you have either an AActor* (reference to Actor in Blueprints), or a UActorComponent* (reference to ActorComponent), and that pointer is getting lost during the serialization, and de-serialization when you added a member to the struct.

if this struct is meant to be in an Array, or DataTable that can also cause this issue to exaggerated levels.

to help with the callstack, it would be greatly helpful to see the actual functions in question: in the Epic Games Launcher, on the tile for the engine version, hit the down arrow (next to launch)->Options, and check “Editor symbols for debugging”, if for some reason you don’t have “Engine Source” that should also be checked,

  • now when you get a crash report with a callstack it will include the function calls, so that it is easier to figure out the specifics.

because you didn’t have the Symbols when this crash happened (the crash report is really showing the raw text from the log file generated the moment of the crash) you would need to re-produce the crash for a more usable callstack.


you “shouldn’t” need to create a brand new struct, you might at the worst case need to remove the current instances of that struct and recreate them when you change the type or name of a member, but changing types, and names should be avoided whenever possible especially if you have a lot of instances of the struct setup.

if you absolutely must change the name of a struct member the method that will cause the least headaches:

  • add a new member of the correct type and name to the struct
    • leaving the previous one in place
  • go to each instance of that struct and assign the value to the new member for each instance
    • this process can be automated, but is most easily done with centralized data-stores, or in C++
  • once you have finished with each instance of the struct, go back to the struct definition, and delete the member that is no longer needed.

keep in mind that both the adding the new member, and removing the one no longer needed will cause all of the instances to serialize, and de-serialize, and each instance will need to be checked after both modifications to the struct definition.