Download

"An internal error has occurred in the compiler" when building in VS2013

Hi,

I’m getting this error every time I try to do a build in VS2013. I’ve installed the latest CTP update, uninstalled and reinstalled VS2013 (professional), and even tried engines version 4.4, 4.4.3 and 4.5.
I’ve reinstalled the dist, and I can’t work this out at all.

Any ideas?


>c:\users\chris\documents\git\unrealengine\engine\source\runtime\core\public\delegates\delegateinstancesimpl.inl(691): fatal error C1001: An internal error has occurred in the compiler.
2>  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 228)
2>   To work around this problem, try simplifying or changing the program near the locations listed above.
2>  Please choose the Technical Support command on the Visual C++ 
2>   Help menu, or open the Technical Support help file for more information
2>  Engine.generated.1.cpp
2>c:\users\chris\documents\git\unrealengine\engine\intermediate\build\win64\inc\engine\engine.generated.2.cpp(6448): fatal error C1001: An internal error has occurred in the compiler.
2>  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 228)
2>   To work around this problem, try simplifying or changing the program near the locations listed above.
2>  Please choose the Technical Support command on the Visual C++ 
2>   Help menu, or open the Technical Support help file for more information
2>  Module.Engine.21_of_30.cpp
2>  Module.Engine.13_of_30.cpp
2>c:\users\chris\documents\git\unrealengine\engine\source\runtime\core\public	emplates\memoryops.h(63): fatal error C1001: An internal error has occurred in the compiler.
2>  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 228)
2>   To work around this problem, try simplifying or changing the program near the locations listed above.
2>  Please choose the Technical Support command on the Visual C++ 
2>   Help menu, or open the Technical Support help file for more information
2>  Module.Engine.29_of_30.cpp
2>  Module.Engine.5_of_30.cpp
2>c:\users\chris\documents\git\unrealengine\engine\source\runtime\core\public\math\float16.h(127): fatal error C1001: An internal error has occurred in the compiler.
2>  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 228)
2>   To work around this problem, try simplifying or changing the program near the locations listed above.
2>  Please choose the Technical Support command on the Visual C++ 
2>   Help menu, or open the Technical Support help file for more information

  • Chris

Completely cleaned out VS and all the redistributables, and used CCleaner to pull out all the registry strings, and it’s still happening. Now going to nuke my windows install from orbit, see if that works.

So, uh, yeah.

Just so I’m not a complete jerk, I got this working - except I’m not sure how or why.

After formatting and reinstalling my OS (Win 8.1) and updating VS2013 Professional (update 3 CTR 4) and making sure that all the redists were installed again, I compiled and I still had the error?

So I redownloaded the 4.4.3 sources (again) and the required files (again) and deleted everything and reunpacked everything into a root directory and then it compiled fine.

And then I tried again on a copy of the source that I knew to be having a problem and it worked, as well.

So, I don’t know how I fixed it. Black magic?

Might be that your RAM is going to fail. Or the disks the files were on.

Are you on a 32 or 64 bit system? Have you tried to build using Unity build or without it?

Btw, there is an answer that seams to work (kind of though): Why am I receiving an error when trying to compile in VS (C1001, MSB3073)? - UE4 AnswerHub

To anyone that encounters this error, this CAN be caused by your CPU. This was the case on my PC. I’ve tested and re-tested it a few times and confirmed it, my CPU (i7-4790k) was clocked at 4.6GHz for ~2 years, water cooled, worked well, with low temperatures, but then a few days ago out of the blue, this error started happening. Sometimes the build process worked perfectly fine, other times I needed a retry or two, but then it got to the point where it seemed totally impossible to ever complete the build without this fatal error.
I’ve clocked the CPU down to stock speed, works perfect. But again, temperatures are fine, it was clocked at this speed and voltage for two years, but it’s definitive that this was the reason, feels like magic now that it works every single time.
Hope this informations helps anyone. Have a good one guys!

There’s a reason Intel only warranties the CPUs at their intended speeds.
Temperature is only one thing that changes with faster clocks; the signal delay of the internal circuitry becomes more marginal as well.

Yet I was surprised, because I’ve done thousands of compiles on this system, probably 300+ of the entire UE source and had not encountered this problem, so it really seemed random, in fact it did fail on random places in header files and that gave it away at the end.

Bumping this to report that I had this error too,


fatal error C1001: An internal error has occurred in the compiler.

when compiling a game project against UE 4.22 built from source. The same code compiled fine on a different machine, using the same VS version, Windows SDK version, etc. What fixed it for me was clearing Visual Studio and UE folders of local app data, so deleting



C:\Users\<Me>\AppData\Local\Microsoft\VisualStudio
C:\Users\<Me>\AppData\Local\UnrealEngine
C:\Users\<Me>\AppData\Roaming\Microsoft\VisualStudio
C:\Users\<Me>\AppData\Roaming\UnrealEngine


You’ll lose your Visual Studio preferences and need to re-enter your Visual Studio license, but VS Community being free that shouldn’t be an issue.