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"

Why does editing of the module header break the project?

When I edit the module header (the one which gets created by the editor and has the same name as the project) my project won't build any more. I know that the code is actually correct as I can recreate the project and add the same source files and it builds (rebuilding the existing project doesn't fix the problem I have to recreate it).

These are the first few lines for errors, but they are really not descriptive:

 ...
 19>  PCH.UTG.UTG.h.cpp
 19>d:\dev\projects\ue4\engine\source\runtime\coreuobject\public\uobject\UObjectHash.h(52): error C2440: 'default argument' : cannot convert from 'EName' to 'FName'
 19>          Source or target has incomplete type
 19>d:\dev\projects\ue4\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(10): error C2504: 'FLogCategory' : base class undefined
 19>d:\dev\projects\ue4\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(10): error C2143: syntax error : missing ',' before '<'
 19>d:\dev\projects\ue4\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(10): error C2039: 'Log' : is not a member of 'ELogVerbosity'
 19>d:\dev\projects\ue4\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(10): error C2039: 'All' : is not a member of 'ELogVerbosity'
 19>d:\dev\projects\ue4\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(10): error C2614: 'FLogCategoryLogUObjectGlobals' : illegal member initialization: 'FLogCategory' is not a base or member
 ...

So, this is in fact report of two problems:

  1. Editing module header breaks the build.

  2. Rebuilding the projects seems to not really clean everything.

I now know that I shouldn't touch the module header, but this still looks like a thing that should be fixed.

Product Version: Not Selected
Tags:
more ▼

asked May 08 '14 at 04:19 PM in Bug Reports

avatar image

Element9
31 3 9 7

avatar image darkZ May 08 '14 at 05:46 PM

I edit my headers all the time and it works fine. Perhaps you could elaborate more about what changes you are making.

avatar image Element9 May 08 '14 at 06:21 PM

Do you even edit the module header? I edited to add some includes as I thought the module header is always precompiled (but since then I learned it doesn't have to be).

avatar image darkZ May 08 '14 at 06:27 PM

Let's say you Game is called StrategyGame, then you are talking about StrategyGame.h right ? If yes, then yes I add more includes to this header and it works fine.

avatar image Element9 May 08 '14 at 06:48 PM

Yes, that one. Hmmm... strange, I get those errors when I edit that header file.

avatar image Tim C ♦♦ STAFF May 15 '14 at 06:22 PM

Hi Element9. If you start a brand new project from one of the templates, then edit the module header, do you get the same error? What are the exact edits that you are making to the module header?

avatar image Element9 May 16 '14 at 04:01 PM

I can't try it at the moment, so I don't know if it can be reliably replicated on a fresh project from a template. But the exact edit was to add one line:

 #include <memory>

after

 #include "Engine.h"

I'll let you know when I try it on a new project from a template. (It did happen to me on more than one project, but I didn't try it on a new project). Unfortunately, I won't be able to do it any time soon.

avatar image Tim C ♦♦ STAFF May 16 '14 at 07:45 PM

I just tried creating a brand new project from a template and made the edit you mentioned, and it didn't cause any problems. Did you base your project off of one of the templates, or did you start with a blank project? Did you make any changes to anything else as well?

avatar image Element9 May 17 '14 at 09:33 PM

I used "basic code" option for starting the new project. No changes other than adding my code, unless I did something unintentionally.

avatar image Tim C ♦♦ STAFF Jun 11 '14 at 10:29 PM

Hi Element9,

Are you still experiencing this issue with your projects?

avatar image Element9 Jun 12 '14 at 09:59 PM

I haven't worked on my project for some time. I'll update to UE 4.2 next week and continue to work on it next week. I'll let you know if I can reproduce the problem in 4.2. Thank you for keeping an eye on this

avatar image Element9 Jun 28 '14 at 12:03 PM

Hi Tim,

I just moved my project to 4.2 and I did get this problem again. Let me know what info do you need from me.

avatar image Tim C ♦♦ STAFF Jun 28 '14 at 06:03 PM

Hi Element9,

Unfortunately I have still not been able to reproduce this issue. Are you able to make this happen in a brand new project? If so, can you provide the exact steps you are following?

Are you using the Development Editor solution configuration in Visual Studio? Are you using 4.2.1 or 4.2.0? Did you build your Engine from source code, or are you using the binary version through the Launcher?

avatar image Element9 Jun 28 '14 at 07:12 PM

Yes, I can reproduce it in brand new project.

  1. I create the "Basic Code" project

  2. Pick "Development Editor"

  3. Build the project. It builds fine

  4. Copy my .cpp and .h files into Source folder and add them to hte project

  5. Build it again. It builds fine

  6. Make any edit to the module header and build the project. I now get those errors when PCH.UE4Test04.UE4Test04.h.cpp was compiled. (The band new project I tried this in is called UE4Test04)

Same happens if in step 2 I pick "DebugGame Editor".

I am using 4.2.1 and it is the version I got by downloading it through launcher.

I can send you my code if you want it.

avatar image Tim C ♦♦ STAFF Jul 01 '14 at 08:31 PM

Hi Element9,

I think I will need to get your code to try to reproduce this. If you could zip and upload the relevant files that would be great.

avatar image Element9 Jul 01 '14 at 09:06 PM

Here are the files I added to the project created from "Basic Code": https://www.dropbox.com/s/wnxbrnjpcc5xgqi/UE4Test04.zip

avatar image Tim C ♦♦ STAFF Jul 02 '14 at 03:44 PM

Thank you for providing those files. When I added them to a project and edited the module header, I was able to see the errors that you described. I will have to do some digging to find out what is causing this to happen.

avatar image Element9 Jul 02 '14 at 05:28 PM

Glad to hear you wear able to reproduce it. Let me know when you find the cause.

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

1 answer: sort voted first

Hi Element9,

I was able to put some time into this issue again today. I think I have narrowed down where the problem is originating. It seems to be something inside your Map class.

What I did was start with a basic code project, built it, edited the game header file to add the #include line, built again, removed the #include line, built again. Then added in the classes you provided one at a time and repeated the steps above until the error appeared again. This is the order I added the classes in:

 Item
 HandHeldItem
 Point2d
 Roll
 BattlePlayerController
 MapConsts
 MapTile
 *Map*
 UTGCharacter + Weapon
 CharacterCreator
 InitiativeList
 ?Battle?
 ?TargetSelector?

The Map class is where the error appeared, and removing that class allowed me to successfully build the project again. The next three lines worked fine without the Map class being included (`UTGCharacter` and Weapon were added at the same time since they depend on each other). I was not able to test the project with the Battle and TargetSelector classes since they require Map. I would suggest trying a new project with all of the classes up to Map included, then rebuild Map a little bit at a time until the error triggers again for you.

If you can narrow down what part of the Map class is triggering the error, we can try to investigate further to find a solution to the issue.

more ▼

answered Jul 08 '14 at 06:30 PM

avatar image Tim C ♦♦ STAFF Sep 06 '14 at 06:45 PM

Hi Element9,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

(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