Engine crashes upon completion of lighting build

Hi, I am using a version of UE4 compiled from visual studio to allow dedicated server creation. Everything has been working correctly but now whenever I build lighting, the engine crashes when the lighting build finishes with the following error:

What changed between my last successful lighting build and the current project is, to my memory:

  • I added a sky map, removing it does nothing
  • I changed a lot of objects in the map to static mobility instead of movable
  • I added an LOD to one mesh
  • I added a lightmass importance volume (Large size) (Tested, changing the size or removing this does not fix the issue)
  • I added 6 large static meshes to cover the entire map’s edges to prevent people from exiting the area
  • I now have a total static mesh count of something like 10000 total on the map

Building on any other map in the project works fine.
I have tried changing some of the things and following other solutions to this issue, but nothing has worked. Considering building lighting takes around 20 minutes each time, I haven’t had to the time to try everything yet.
Note: I am running on a computer with 16 GB of RAM with a 100GB pagefile and have tried updating drivers to no avail. Changing the lighting quality also does not help.

  • Edits:
  • Formatting
  • Rebuilt light-mass, the engine, and the project to no avail
  • Checked antivirus logs, no errors
  • My windows x64 username does not contain and non US standard letters
  • I have updated my drivers for my graphics and everything else
  • I am going to try removing large chunks of the map until a build works successfully to pinpoint the issue
  • It appears that the crash occurs when importing at 14% completion when it does crash
  • I have discovered that the issue is certain objects in my scene.
  • I have spent hours trying to pinpoint the issue but am unable to as it appears there are multiple objects in my scene causing this crash
  • Cutting all of the actors in the scene and then pasting them fixes all lighting issues, but it resets any customized instances of blueprints which basically ruins my entire road system and also rotates a lot of buildings. Id like to avoid this if possible.

I cut and pasted all of the actors in my map, then rebuilt my entire road system which it broke using better practices. This fixed any crashes.

Although this is somewhat older, building the lightmaps has always been catastrophic in UE. The least little thing can cause crashes or endless loops where building never ends. Worse it can be so that sometimes it works and then the next exact same build does not. That happened to me.
The reasons for crashes and hangups are probably many, but I was able to figure out what the reason in my case was (version 4.22) and I want to post it here since this one comes up in search results so I hope thos post may help others with the same problem.
In my case I had an auto landscape material and I put some clutter ground cover things into the grass layer, plants etc. For some of them I used the “Use landscape lightmap” flag in the landscape grass BP. That was the killer which caused nearly constant crashes at the end of the light build process. Yet sometimes the same level would build.
Clearing that flag for all decorative objects in the grass system fixed the crashes for me.