I'm getting an error regarding 0xc000012f Unreallightmass.exe - Bad image

I have gotten this error when ever I press build. I have tried re-installing, clearing cache, running as and administrator. I have unreal installed on my D: drive as it has much more space and my c: drive is boot and windows with a few programs that I need on an ssd to run. I haven’t tried installing it on the ssd yet, but I would prefer not to. I’m not sure what to do at this point any help would be appreciated.

327200-error2.png

Did you find a solution to this?

Might be a bit late, but I just bumped into the same issue with Unreal Engine 5.0.1 using a custom build of the engine.

I managed to get rid of this error and light bakes to work properly again after going into the folder where your engine is installed “(your install path here)\Engine\Saved\Swarm\SwarmCache” (for me this was in “C:\Work\UE5_Source\UnrealEngine\Engine\Saved\Swarm\SwarmCache”)

In here you’ll likely see a bunch of .dll files like embree.dll, but most likely with a date string and architecture string appended behind it (for me it was something like embree_2022-05-11_23-14-26_8002048-64bit.dll). To fix this, rename all the dlls in this folder back to their original names by simply removing this long date and architecture string (so turning it back into embree.dll for example).

I did this for:

  • AgentInterface.dll

  • embree.dll

  • SwarmInterface.dll

  • tbb.dll

  • tbbmalloc.dll

and all the Unreal lightmass dll files.

After doing this my version of the engine no longer throws this error and building lights and maps works as it always does again.

Hope this helps someone.

1 Like

Hello actually there is a faster method.
Open swar agent and clic on CACHE and then CLEAN then Validate.