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"

EPIC: Building new code project fails ( Hardware Configuration Problem? )

This is a bit of an extension of the question I wrote here: https://answers.unrealengine.com/questions/40807/unrealbuildtool-files-gone-invalid-class-when-buil.html

Hopefully someone from epic can help me solve this problem. It is severely disrupting the workflow here. Especially when it comes to patches and updates of the engine.

These are my repo steps:

  1. download a fresh version of the engine using the launcher (4.2.1 here)

  2. Launch Engine

  3. Create new Basic Code Project, Visual studio launches.

  4. Compile new Project and get following error.

    1>------ Build started: Project: ShadowHeroesGame, Configuration: DebugGame_Editor x64 ------ 1> Parsing headers for ShadowHeroesGameEditor 1> Code generation finished for ShadowHeroesGameEditor and took 3.088 1>EXEC : error : System.Management.ManagementException: Invalid class 1> at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) 1> at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext() 1> at UnrealBuildTool.LocalExecutor.ExecuteActions(List`1 Actions) 1> at UnrealBuildTool.UnrealBuildTool.ExecuteActions(List`1 ActionsToExecute, String& ExecutorName) 1> at UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments) 1> Cumulative action seconds (8 processors): 0.00 building projects, 0.00 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other 1> UBT execution time: 10.07 seconds 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""F:\UE4\Unreal Engine\4.2\Engine\Build\BatchFiles\Build.bat" ShadowHeroesGameEditor Win64 DebugGame "C:\Users\Justin\Documents\Unreal Projects\ShadowHeroesGame\ShadowHeroesGame.uproject" -rocket" exited with code -1. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Looking into it, this is a problem with the unreal build tool. Specifically, inside LocalExecutor.cs What I have needed to do in the past was go to line 299 and comment out the following block.

 // Use WMI to figure out physical cores, excluding hyper threading.
             int NumCores = 0;
             if (!Utils.IsRunningOnMono)
             {
                 foreach(var Item in new System.Management.ManagementObjectSearcher("Select * from Win32_Processor").Get())
                 {
                     NumCores += int.Parse(Item["NumberOfCores"].ToString());
                 }
             }

Then everything works just fine. But it requires me to download the GitHub source which removes my ability to use a lot of the content examples because they are for slightly new versions. Re downloading the engine and recompiling it whenever an update happens is also a pain given that I have to go in the settings of each project and re-target them each time.

Now, given that this is likely an issue with the specific cpu configuration, my main question is what could I change to prevent this from continuing to happen. given that the code that causes the problem is using "WMI to figure out physical cores, excluding hyper threading", I'd love to know what that means and how it works. Perhaps this can point me in the correct direction so I can tweak my hardware. Maybe it's a configuration not supported by UE4 or something not accounted for that could be patched (though I hope it's something local I can change).

Attached Here are my cpu, mainboard and memory specs. Maybe there is a hardware conflict that can be spotted.

Product Version: Not Selected
Tags:
justin-pc.txt (85.6 kB)
more ▼

asked Jul 03 '14 at 03:15 PM in Bug Reports

avatar image

Justin.Dooley
2.1k 104 73 163

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

1 answer: sort voted first

Well, I appear to have solved this problem. My own frustration caused me to dig into it a lot deeper then I would usually. I had 2 problems apparently.

To begin with, I had to download the WMIdiag tool from Microsoft Here.

Next I run it as an admin but it hung. Looking into why, I found that it was likely because my WMI repository was corrupt so I ran the following script to rebuild the repository as a bat file. (credit CC Hameed for this post )

 @echo off
 sc config winmgmt start= disabled
 net stop winmgmt /y
 %systemdrive%
 cd %windir%\system32\wbem
 for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s
 wmiprvse /regserver 
 winmgmt /regserver 
 sc config winmgmt start= auto
 net start winmgmt
 for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s

That allowed the diag to run. but I found that the problem was that I didn't have a wmi directory listed in my Path environment variable for the USER It had to be user for some reason. System was not enough. Doing that left me with some other errors that where performance classes that where not being found.

Running Winmgmt /resyncperf from the command prompt appears to have resolved those. Now I can happily compile.

Hope this helps anyone who has the same problem I did.

more ▼

answered Jul 03 '14 at 06:33 PM

avatar image

Justin.Dooley
2.1k 104 73 163

avatar image UtopiaRTS Jul 03 '14 at 06:37 PM

I just got an email saying I've been mentioned in this post. It appears that @echo in the code sends me an email when it's posted. XD

avatar image Justin.Dooley Jul 03 '14 at 06:50 PM

Well that's interesting to know. I'm actually quite surprised this is the first time it has happened.

(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