UE4.3 build: Compiler Driver crashed with VS2012

Hello,

I had no problem build all the previous version UE4 ( up to 4.2.1 ) using Visual Studio 2012 …

In the past two days, I had downloaded UE4.3 version (released code, req 1&2, optional), and I never able to build the engine with Visual Studio 2012 anymore with this UE4.3 version…

The build actually crashed “Microsoft C/C++ Compiler Driver” and I believe it happened when it comes to
23> PCH.UnrealEd.UnrealEd.h.cpp
23> PCH.Engine.EnginePrivate.h.cpp

Since the crashed of the Compiler Driver, it means the whole build will never completed with the error:

UBT error : Failed to produce item: UE4Editor-UnrealEd.lib

I had tried it with two different machines (with Visual Studio 2012) and the same issue of crashing happened on both machines…

Any advise would be much appreciated…

PS: Just for information, I have no issue of building UE4.3 on Visual Studio 2013 … but I do need the UE4.3 to be build with Visual Studio 2012 because our academic institute does not want to support VS2013… :frowning:

Thanks
K

Hi kevin4,

I tried to reproduce this error with Visual Studio 2012, but was unable to do so. Would you be able to provide the dxdiag information for the computer you are using?

Just to make sure nothing was corrupted during the download process, could you try downloading the files again?

Thanks .

Please see the attached of the x86 + x64 dxdiag information of the machine that I was using…

I will re-download everything again and see if it happens again…

Shall keep you update…

link text

Hi ,

I am afraid the same issue happened with the new download (Optional, Req 1& 2, UE4.3-released), build with Visual Studio 2012

This is the snapshot of the crash of CL (one of the CL processes), hopefully it will help you to understand what is going on?

Hi kevin4,

That message actually looks somewhat similar to a message I saw a few months ago on a different computer. I don’t recall the actual error message I received because it did not actually stop the build, and I have never seen it appear on my computer. I noticed that Visual Studio 2012 was still compiling even after the message appeared, so I let it continue. I ended up with several of the error messages displaying on my screen, but the build was completed successfully. When the error message appears for you, does the build fail at that point?

I may need to go back to that other computer and try to build the Engine again and see if the error message appears again to find out if that is the same error you are seeing.

Hi ,
Thanks for your message…

The build will still carry on building because the other 3 cl.exe processes are still working.

If I don’t click on ‘Close the program’ on Error message box, the build will still carry on all the following compilations (such as rc.exe etc) …
Until it completed the compilation, VS2012 will pause and ‘do nothing’ until I click on ‘Close the program’ (because the crashed cl.exe process still there)… Then the library will then build BUT failed building the UE4Editor-UnrealEd.lib

I had tried with two machines, and both had the same issue happened… :frowning:

Please let me know if you need any other information…

Hi Kevin,
Just as a test, can you change your UE path from E:\UnrealEngine-4.3_VS2012 to E:\UE4 and see if that works.

Hi , Hex,

The suggestion from Hex seems to be “sorted” the issue of the Compiler Driver crashed…

I have now used UE4 as the folder instead of UnrealEngine-4.3_VS2012, and the build seem to go through without any issue of the crash…

How weird that, previous version of UE, I used the similar folder name in 4.2.1, as UnrealEngine-4.2.1_VS2012, and it didn’t cause any issue… :slight_smile:

Never mind, I believe we had found a way around the problem (is to use shorter folder name :slight_smile:

Many Thanks again, much appreciate for your efforts and suggestions.

K

Hi ,
The error in the Output is the same, to say that
UBT error : Failed to produce item: UE4Editor-UnrealEd.lib

I assume that is caused by one of the Compiler didn’t manage to compile the cpp file…

Anyway, I had now used shorter folder name, UE4 (suggested by Hex) and it seems to able to go around the issue…

Thanks for your efforts!

Hi kevin4,

I am going to try to get access to the computer where I saw the errors I described previously and see if I can get them to appear again to confirm whether they are the same errors you are seeing.

When the build actually failed at UE4Editor-UnrealEd.lib, did Visual Studio display an error in the Output?

Hi kevin4,

I am glad to hear that everything is working for you now. Please let us know if you run into any other problems.

Hi ,

I recently had this exact issue compiling in VS 2012 and it was also fixed by moving the project to C:\UE4. This isn’t a permanent solution for me however as I’m part of a large team working from source control. Other developers here haven’t experienced this issue so I’m curious as to the source of this fix and how I can get it to work using a different path? I’m using the 4.4 build.

Hi Psyonix-Dave,

I tried building version 4.4.3 of the Engine using VS2012 and did not have any problems doing so. The location where I built it was D:\Source\VS2012\UnrealEngine-4.4.3-release. What was the location on your computer where you were initially trying to build the Engine?

The location it doesn’t work is

I found out the compiler driver is crashing by running UnrealBuildTool directly. Either way, the compile process continues but in the end I get this…

UBT ERROR: Failed to produce item:

Other people here have compiled the same build with similar paths so something must be misconfigured on my machine somehow but I don’t know where to look. I’ve already wiped the entire build and restarted the process to no avail.

I did some more testing on this yesterday by building the Engine a few times using VS2012 in locations with file paths that were similar or identical to the one you mentioned. All of those builds completed successfully. Just to make sure I had it set up correctly, was the UE4.sln file located in the Public folder that you named above?

Could you open the Properties window for the UE4 project and check the Configuration Properties. If you could get some screenshots of those settings, I will compare them to what I have and see if there are any differences that might be contributing to this issue.

This is a known compiler problem as has been discussed a lot in the other place, are you sure you tested against 4.3 like the OP ? 4.4 is actually worse, I’m guessing 4.5 / head is a lot better after people have been on the case fixing things.

Config screens are attached. I also tried debugging the compiler driver crash. It is crashing in _putenv_s while trying to set an environment variable which appears to contain all the compiler options (very long string due to all the -I includes with full path info). The crash is due to parameter validation failing as described here - although I wasn’t able to get any error codes or anything else useful.

Edit: Yes, UE4.sln is in the public folder.

Hi Psyonix-Dave,

It looks like a potential fix for this issue has been worked into 4.5. If you get a , merge that commit into your Engine code and try building the Engine again in the original location. Unfortunately, since I was unable to duplicate the issue, I can’t test this myself to see if it helps.

@HexTank
I have tried reproducing this issue with a number of different versions of the Engine. Most recently Psyonix-Dave had indicated having trouble with 4.4, so that is where I have been concentrating.