Project Crashes on Startup After Adding Struct in UE4 v4.26

For context, I’ve been working on this project for nearly two years and I don’t have any kind of source control set up. In hindsight I now know this was a very naive way to go about developing a game, especially a long-term project, but I’m definitely an artist first and foremost and I severely underestimated how important maintaining backups would be.

Yesterday while working on a weapon discovery system for my first person shooter, I created a few structs to help store information about each weapon (weapon class, discovered bool, show if undiscovered bool, etc) within a save file. After closing the project for a break, I attempted to relaunch it only for the editor to crash before fully opening (around 93-95%) with the error “Unhandled Exception: EXCEPTION_ACCESS_VIOLATION writing address 0x0000000000000008”. This now happens every time I try to open the project.

I initially thought the error was caused by those new structs I created, so I migrated my content to a blank project and combed through my assets. Turns out several of the structs I created open just fine, while a few immediately crash the editor with similar logs to the initial crash. I eventually narrowed the issue down to my parent weapon class, from which all the guns in my game are derived from, causing the error; any asset that references this parent class, including a few of the structs I’d just created, promptly crashes the editor when interacting with them in any way (right clicking in content browser, renaming, opening, etc). If I remove the parent class from the project’s content folder in Windows Explorer, the editor is able to fully open but as expected every asset that references the parent class returns an error.

I’m now at a bit of a crossroads as to how to proceed; up until this point I’d had no issues using that parent weapon class across my entire project, but as soon as I added new structs that reference it every asset that also references it (including about a dozen child classes) causes the editor to instantly crash. I feel it’s worth noting I’ve previously set up structs that reference the parent class with no issues as well. Is my parent class somehow suddenly the problem, or are the new structs causing all of this?

The only real path forward I can wrap my head around would be to recreate my parent class and all of it’s children from scratch and then go through and manually replace every reference to the old class with the new one, likely around a weeks’ worth of work. I’m more than willing to do this if it works; much rather be set back a week than a couple years. However, if there’s a better way to do this or the issue doesn’t even lie within that class and it is the new structs, I’d sincerely appreciate a nudge in the right direction. Thank you in advance!

Hi ,

I had a similar problem multiple times. Each time this occurred for me, first I rolled back my struct change so that I could unbrick my project.

I know you said you don’t have source control, but UE4 does have a backup folder here:
/unrealengine/launcher/backup/

Remember in the future, that if you change a struct which is associated with any object and then later you make changes to that struct, you will brick your project. UE4 doesn’t handle making changes to struct or just struct in general very well.

The best way I’ve found to prevent the issue is to make the change to the struct and then open/manually save any files which were using that struct.

I hope this helps you.

1 Like