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"

2 classes breaking my program

I have a UE4 project that won't open in the past few days. It crashes on startup and I am unable to do anything in it. I'm desperate so here is my full, unaltered log. I have two classes, Starship and GameManager that are causing issues apparently, according to the log. In the definitions of the classes, the GENERATED_BODY() macro has "no storage class or type specifier" and the engine "cannot open" the generated headers, according to VS. However, none of my other classes have these issues. If there is anything else I can send for help, I'll gladly send it. This might be a UE4 issue, not sure. I have tried: compiling without any of my src in the source folder but still project outputs exact same log, deleting saved and intermediate, regenerating visual studio files, rebuilding, building, and cleaning. However, I duplicated my project through the library and IT DID OPEN TO THE EDITOR, but was in a mangled state with many assets missing.

Product Version: UE 4.19
Tags:
star-cataclysm.log (38.0 kB)
more ▼

asked Jul 03 '18 at 07:23 PM in Using UE4

avatar image

AngryBeanspr0ut
24 1 1 6

avatar image AngryBeanspr0ut Jul 03 '18 at 07:25 PM

I've had questions up for months that never get answered, so really anything can help. Im lost.

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

1 answer: sort voted first

First of all download debugging symbols (PDB) as i don't see engine call stack, you should have it in installation option in installed, they very useful inf you use C++ and it hard to debug without them. I only know your code is involved in crash as it shows in call stack (PDB for you code is generated when you compile it) more specificly constructors from your classes, engine also prints out the cause of it, so yes always look in logs when you get crash, solution is sometimes there:

 "[2018.07.03-19.06.15:620][  0]LogWindows: Error: UObject() constructor called but it's not the object that's currently being constructed with NewObject. Maybe you are trying to construct it on the stack, which is not supported.

Constructor of any UObject (this includes AActors which are also UObjects) class is called on module load on engine start up during creation of Class Default Object (CDO) which stores default values, this means if there something goes wrong in constructor the engine will on start up. Just by looking on call stack there something od in your costructor:

 [2018.07.03-19.06.15:620][  0]LogWindows: Error: [Callstack] 0x00000000EAD82280 UE4Editor-CoreUObject.dll!UnknownFunction []
 [2018.07.03-19.06.15:620][  0]LogWindows: Error: [Callstack] 0x00000000D9858CEE UE4Editor-Engine.dll!UnknownFunction []
 [2018.07.03-19.06.15:620][  0]LogWindows: Error: [Callstack] 0x00000000C12C7AEF UE4Editor-Star_Cataclysm-1026.dll!AStarship::AStarship() [c:\users\jqgdl\onedrive\documents\unreal projects\star_cataclysm\source\star_cataclysm\starship.cpp:8]
 [2018.07.03-19.06.15:620][  0]LogWindows: Error: [Callstack] 0x00000000C12C22BF UE4Editor-Star_Cataclysm-1026.dll!AGameManager::AGameManager() [c:\users\jqgdl\onedrive\documents\unreal projects\star_cataclysm\source\star_cataclysm\gamemanager.cpp:7]
 [2018.07.03-19.06.15:620][  0]LogWindows: Error: [Callstack] 0x00000000EAB454F8 UE4Editor-CoreUObject.dll!UnknownFunction []
 [2018.07.03-19.06.15:620][  0]LogWindows: Error: [Callstack] 0x00000000EADD7D30 UE4Editor-CoreUObject.dll!UnknownFunction []
 [2018.07.03-19.06.15:620][  0]LogWindows: Error: [Callstack] 0x00000000EADB94A2 UE4Editor-CoreUObject.dll!UnknownFunction []

Call stack suggest that AGameManager costructor is calling AStarship costructor for some reason, like you trying to create AStarship inside AGameManager constrictor which is something that should not happen there. Due to nature of UObjects and UE4 reflection system, special use of constructors in UObject and mentioned CDO creation, constructors of UObject should not have any gameplay code and should only set default variables and/or set up components. Constructors are called in early initiation of the engine and object/actor it self and not everything is initiated during that point, which means most things you gonna try to do there most likely will crash, instead you should use events that UObjects and actors provide, it allows to inject code on most of most initiation steps some of them are described there:

https://docs.unrealengine.com/en-us/Programming/UnrealArchitecture/Actors/ActorLifecycle

PostInitializeComponents (runs also in editor) and BeginPlay (runs only in gameplay) are the safest spots as everything should work on that point.

Error message quated on top also suggest whatever you doing to create the actor you doing it wrong, actors should be only created with ActorSpawn and UObjects with NewObject and you should not do that in constructor because it gonna mess up CDO.

Thats all i could deduced from what you gave, for more you need to get those debug symbols and code snippets of both AStarship and AGameManager cpp and h files, aspecially constructors ofcorse

more ▼

answered Jul 04 '18 at 12:45 AM

avatar image

Shadowriver
37.2k 936 172 1116

avatar image AngryBeanspr0ut Jul 04 '18 at 01:55 AM

link text

so I actually did find an issue in my gamemanager constructor with me trying to make a starship in it, but it is gone now. However, the issue still subsists.heres a zip of all of the starship and gamemanager files in their current state. As I said, I found the problematic code and removed it. If you can find anything else that could be causing this, I'm all ears. Just tell me what's next.

pdb.txt (3.3 kB)
files.zip (3.3 kB)
avatar image Shadowriver Jul 04 '18 at 02:13 AM

then you got old bineries, delete your dlls in bineries forder

avatar image AngryBeanspr0ut Jul 04 '18 at 02:20 AM

thanks for the help. fixed my issues.

(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