Thanks, been trying to work out what was causing baking to crash when upgrading to 4.22 for a while now - good spot!
Has anyone reported this as a bug yet?
I’ve been getting an identical error all summer, but under slightly different circumstances. The engine crashes after a light build, and gives the same error you posted at the top. I have been unable to reproduce this in another project, but it happened also in the 4.23 preview 6. Any movement on this?
I get the same issue for the same reasons. It doesn’t happen in 4.23 preview 7 so I assume they’ve fixed it in that. Need to wait for release for the plugins I’m using to be updated before a full test.
I noticed that the crash did not happen when I accidentally changed the directional light to movable. Naturally, all the static meshes rendered black since they were set to static lighting, but it was a step forward (though not in terms of framerate, which dipped to 1-2fps). I will also see if it is fixed in preview 7, but I am not optimistic.
Is there actually a bug tracking number or ID for this? I haven’t been able to find anything similar at issues.unrealengine.com, or mentioned in any of the fixes listed in the release notes for 4.23 preview.
For anyone following this, the “assertion failed … lightmaprending.cpp line 49” error also occurred when I tried to build lighting after opening the project in UE4.23 preview 7.
I came up with a “fix” that works for my situation, but does not solve the underlying problem. My work-around was to copy actors to separate levels, and stream them simultaneously using level streaming. Instead of tens of thousands of actors in the same level, they are split among 30+ streaming levels, each with a few hundred to a thousand actors. This seems to keep the Built data to a small enough size that the Engine does not crash.
This took a LOT of trial and error – copy, paste, light build, CRASH, repeat – until I made the levels small enough not to crash. The reason I know the underlying problem still exists is because I did not delete the original levels (as a control group). Even though the originals are empty (exactly zero actors), if I build light while they are active, the Engine will crash to desktop. I should mention that the message window still displays a “light build crash” error following the successful light build, even though it does not crash to desktop, and allows me to save the level with the built lighting.
The problem still exists in version 4.23. I also tried copying all my assets to a new project, but this rendered the same result. As I mentioned in an earlier comment, doing a light build with the lights set to Dynamic did not cause an Engine crash, but defeats the purpose of using built light, since you don’t benefit from the performance boost of pre-computed shadows, etc. In addition, it made my project crawl to 1-2 frames per second, and just looked ugly (even after taking the time to change every actor to movable.
It’s too bad that this problem exists because I can’t figure out how to reproduce it in a new project, and that means a bug report won’t do much to help. I hope my method above works for you!