Project fails to compile in VS after migration to 4.11

Hi, everybody.

I’m trying to migrate our project from 4.9.2 to 4.11. After I’ve changed engine version to 4.11 I’m unable to build project from VS (btw, we’re using 2013 if it matters). Looks like UHT fails at some point :frowning: Here’s what VS build output looks like:

Creating makefile for SOB_prototypeEditor (no existing makefile)
Performing full C++ include scan (no include cache file)
Parsing headers for SOB_prototypeEditor
Running UnrealHeaderTool "D:\usr\dima\work\SOB\Shades of black\Prototype\trunk\SOB_prototype.uproject" "D:\usr\dima\work\SOB\Shades of black\Prototype\trunk\Intermediate\Build\Win64\SOB_prototypeEditor\DebugGame\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -installed
LogCompile : error : Failed to initialize the engine (PreInit failed).
Error : Failed to generate code for SOB_prototypeEditor - error code: CrashOrAssert (3)
UnrealHeaderTool failed for target 'SOB_prototypeEditor' (platform: Win64, module info: D:\usr\dima\work\SOB\Shades of black\Prototype\trunk\Intermediate\Build\Win64\SOB_prototypeEditor\DebugGame\UnrealHeaderTool.manifest).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""D:\Program Files\Epic Games\4.11\Engine\Build\BatchFiles\Build.bat" SOB_prototypeEditor Win64 DebugGame "D:\usr\dima\work\SOB\Shades of black\Prototype\trunk\SOB_prototype.uproject" -waitmutex" exited with code -1.
Done executing task "Exec" -- FAILED.
Done building target "Build" in project "SOB_prototype.vcxproj" -- FAILED.

Has anyone encountered something like this?

This looks like internal crash in UHT, maybe try to recompile it. Or do clean engine build if that won’t help

1 Like

We’re using UHT from the engine distribution, not sefd built. Is it possible that it’s a bug?

Hello dkndr,

If you’re using the Binary build of the engine (from the Launcher), then you’ll need to use Visual Studio 2015 to build correctly. You still have the option to use Visual Studio 2013 but only if using a source built version of the engine which requires a command. You can find out more information on that here:

So basicaly UHT fails while executing theese lines:

if (GEngineLoop.PreInit(*ShortCmdLine) != 0)
{
	UE_LOG(LogCompile, Error, TEXT("Failed to initialize the engine (PreInit failed)."));
	return ECompilationResult::CrashOrAssert;
}

So my guess is that it’s not related to UHT itself. Does anyone have a clue on how to diagnose this further (except for rebuilding the entire engine friom sources)? :slight_smile:

I’ve tried to build my project with both VS 2013 and 2015 (after cleaning all artifacts from the previous build of course). BTW the log attached is from VS 2015.

Have you given a try with a brand new project to see if it compiles correctly? This should let us know if it’s your installation’s problem or if it is a project conversion issue.

We haven’t heard from you in a while, dkndr. Are you still experiencing this issue? If so, can you try a new project to ensure that you’re able to compile that? In the meantime, I’ll be marking this issue as resolved for tracking purposes.

I have the same issue for two cases: Convert project from 4.10 to 4.11p4 and after convert 4.11p3 project to 4.11p4 . Clean new project is compilling correctly as well as new project with source from previous version of UE.

Hello R&D Lab,

Do you still have a copy of the project that is using 4.10? If so, would you be able to provide a copy of this so that we can see this conversion issue first hand? We’ve had a few reports of this problem but haven’t been able to nail down the cause. The workaround that usually works is to migrate the content / source to a new project that is already created in the newer version but we would like to get to the root of the problem.

If you need to send it in a private manner, you can feel free to send it to me via a private message on our forums.

[1]:

Are you still experiencing this issue, R&D Lab? If so, could you provide a copy of your 4.10 project as I requested in my previous comment? It would be helpful in reproducing the issue. In the meantime, I’ll be marking this as resolved for tracking purposes.

Had the exact same problem. Deleted Binaries, Intermediate, Saved and Build, but it didn’t help.

Then deleted the project entirely and copied it from my second PC, where the transition to 4.11 happened a couple of commits ago. This fixed it. I guess deleting the project and pulling everything from a repository would’ve helped also, so try that. If not, checkout previous commits, port it to 4.11 and then go back to the latest commit.

I hit the same issue here. It wound up being that I had a plugin that was no longer available, and, while I selected to disable it, the build would still fail. Instead, I edited my .uproject in a text editor and disabled the plugin in there, and then the build would work again.

Cheers,

Alan.

Yeah, this ended up being (Basically) my problem. I was trying to sync backwards but I hadn’t reverted my uproject file and it referenced a plugin that we had only added in a later version. Thanks.

This fixed the problem for me - had to disable the Substance plugin via the .uproject.

Ah Man! This saved me as well! I had a plugin enabled even tho I told the prompt to disable it! I manually set it to false as you suggested and It managed to build just fine in 4.11.2! Thanks for sharing!

I had the same issue in converting to 4.12. To fix it I did the following:

Launched the 4.11 project and disabled the non-built in plug in.
Opened the 4.11 project in Visual Studio 2015 and did a Clean Solution.
Closed Unreal Editor Project and Visual Studio project.
Launched the 4.12.3 Unreal Engine and then the Convert / Copy To worked flawlessly.