x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Resolved] Can't Compile in 4.17

 1>------ Build started: Project: ECGame, Configuration: Development_Editor x64 ------
 1>  Creating makefile for ECGameEditor (no existing makefile)
 1>  Performing full C++ include scan (no include cache file)
 1>EXEC : error : System.ArgumentException: An item with the same key has already been added.
 1>     at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
 1>     at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
 1>     at UnrealBuildTool.UEBuildTarget.Build(BuildConfiguration BuildConfiguration, CPPHeaders Headers, List`1 OutputItems, List`1 UObjectModules, ActionGraph ActionGraph)
 1>     at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile)
 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command "C:\UE4_Builds\UE4_Eclipse\Engine\Build\BatchFiles\Build.bat ECGameEditor Win64 Development "E:\P4\JBaxter_Work\Eclipse\Eclipse_Steam\ECGame\ECGame.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Just updated my project to 4.17 - Release branch, and it refuses to compile. Tried on two different PC's, cleared cached data and temporary files, rebuilt the solution and also followed some of the steps posted by other users regarding this issue.

Need a suggestion ASAP, pretty much a blocker right now :/

Product Version: UE 4.17
Tags:
more ▼

asked Aug 08 '17 at 05:47 PM in Bug Reports

avatar image

TheJamsh
815 57 96 140

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Okay so I've finally solved it. I will say -10 brownie points for utterly crap logging information on this one.

The problem was caused by two of my Plugins having multiple module types specified. In previous versions of the engine this would compile, but I guess it just causes crashes now.

Old code (ST_CascadeExtensions.uplugin)

     "Modules": [
         {
             "Name": "ST_CascadeExtensions",
             "Type": "Runtime",
             "LoadingPhase": "PreDefault"
         },
         {
             "Name": "ST_CascadeExtensions",
             "Type": "Developer",
             "LoadingPhase": "PreDefault"
         },
         {
             "Name": "ST_CascadeExtensions",
             "Type": "Editor",
             "LoadingPhase": "PreDefault"
         }
     ]

New Code:

 "Modules": [
     {
         "Name": "ST_CascadeExtensions",
         "Type": "Runtime",
         "LoadingPhase": "PreDefault"
     }
 ]


I would REALLY appreciate better logging here! Thanks to Kamrann for showing me how to step through.

more ▼

answered Aug 09 '17 at 12:49 PM

avatar image

TheJamsh
815 57 96 140

avatar image Ben Marsh STAFF Aug 09 '17 at 01:20 PM

Thanks for the report. This wasn't a deliberate change. I will take a closer look.

avatar image TheJamsh Aug 09 '17 at 02:08 PM

Thanks Ben!

avatar image fkrstevski Sep 25 '17 at 01:19 AM

Hey Ben, any update on this?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

May just be that UBT has been broken, but you'd at least be able to get some more info by running it in the debugger.

You can set the UnrealBuildTool project as your startup project in VS, then in its properties, Debugging tab, enter the command line arguments to point it to build your project. Hit F5 and it should break on the exception, letting you see exactly what line, and what it was trying to add to the dictionary when it failed.

more ▼

answered Aug 09 '17 at 11:50 AM

avatar image

kamrann
2.1k 83 33 119

avatar image TheJamsh Aug 09 '17 at 12:14 PM

Thanks, I'm trying to run it with the following options.

 ECGameEditor Win64 DebugGame "C:\Users\Admin\Desktop\P4Manual\Eclipse\Eclipse_Steam\ECGame\ECGame.uproject" -waitmutex

I still don't get any Breakpoints, but i do get this:

 Creating makefile for ECGameEditor (Build.version is newer)
 'UnrealBuildTool.vshost.exe' (CLR v4.0.30319: UnrealBuildTool.vshost.exe): Loaded 'D:\GIT\UnrealEngine\Engine\Intermediate\Build\BuildRules\UE4Rules.dll'. Symbols loaded.
 'UnrealBuildTool.vshost.exe' (CLR v4.0.30319: UnrealBuildTool.vshost.exe): Loaded 'C:\Users\Admin\Desktop\P4Manual\Eclipse\Eclipse_Steam\ECGame\Intermediate\Build\BuildRules\ECGameModuleRules.dll'. Symbols loaded.
 Exception thrown: 'System.ArgumentException' in mscorlib.dll
 ERROR: System.ArgumentException: An item with the same key has already been added.
    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    at UnrealBuildTool.UEBuildTarget.Build(BuildConfiguration BuildConfiguration, CPPHeaders Headers, List`1 OutputItems, List`1 UObjectModules, ActionGraph ActionGraph) in D:\GIT\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 2384
    at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile) in D:\GIT\UnrealEngine\Engine\Source\Programs\UnrealBuildTool\System\UnrealBuildTool.cs:line 1396
 The thread 0x2c30 has exited with code 0 (0x0).
 The thread 0x2564 has exited with code 0 (0x0).
 The program '[5628] UnrealBuildTool.vshost.exe' has exited with code 0 (0x0).
avatar image kamrann Aug 09 '17 at 01:05 PM

Command looks fine, have you put that in the 'Command line arguments' box, and have 'Start action' set to "Start project"? If the debugger is attached properly to the UBT process you should definitely be getting a break. Try manually adding a breakpoint, maybe at the start of RunUBT in UnrealBuildTool.cs, and confirm that it gets hit.

avatar image TheJamsh Aug 09 '17 at 12:38 PM

I've stepped through the code manually, and it's taken me to here.

Why do I feel like this is related to Plugin dependency changes in 4.17?

alt text

error.jpg (154.3 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question