Project crashing on startup

Engine froze on me while I was compiling a c++ project, so had to close it via task manager. Now, whenever I try to launch that project, it will crash every time at exactly 70%. Any help would be appreciated. Anyways, here’s the log:

MachineId:A99369B841900EEBFA8E4FA20AA9E627
EpicAccountId:a102052b53f1486c98fa4f96d2f37a26

Unknown exception - code 00000001 (first/second  not available)

Assertion failed: !ObjectInitializer.Obj || ObjectInitializer.Obj == this [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 1881] 

KERNELBASE + 293772 bytes
UE4Editor_Core!FOutputDeviceWindowsError::Serialize() + 292 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor_Core!FOutputDevice::Logf__VA() + 248 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor_Core!FDebug::AssertFailed() + 1079 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:224]
UE4Editor_CoreUObject!UObject::UObject() + 300 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1882]
UE4Editor_Engine!AActor::AActor() + 38 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actor.cpp:55]
UE4Editor_Engine!APawn::APawn() + 32 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\pawn.cpp:35]
UE4Editor_Engine!ACharacter::ACharacter() + 47 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\character.cpp:29]
UE4Editor_Game!AGameCharacter::AGameCharacter() + 27 bytes [c:\users\corey\documents\unreal projects\game\source\game\gamecharacter.cpp:12]
UE4Editor_Game!ATestCharacter::ATestCharacter() + 84 bytes [c:\users\corey\documents\unreal projects\game\source\game\testcharacter.cpp:9]
UE4Editor_CoreUObject!UClass::CreateDefaultObject() + 435 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\class.cpp:2535]
UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties() + 805 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:739]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() + 146 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:815]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() + 7 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:921]
UE4Editor_Core!TBaseMulticastDelegate<void>::Broadcast() + 149 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:1030]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() + 2194 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\modules\modulemanager.cpp:359]
UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase() + 784 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\projects\private\moduledescriptor.cpp:350]
UE4Editor_Projects!FProjectManager::LoadModulesForProject() + 581 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\projects\private\projectmanager.cpp:53]
UE4Editor!FEngineLoop::LoadStartupModules() + 705 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launchengineloop.cpp:1863]
UE4Editor!FEngineLoop::PreInit() + 11141 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launchengineloop.cpp:1400]
UE4Editor!GuardedMain() + 251 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:110]
UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

Try debugging your project to find which piece of code is causing the crash. In Visual studio the default debug hotkey is F5.

Thanks for the reply. When running the project it encounters a breakpoint with this as the error:

Assertion failed: !ObjectInitializer.Obj || ObjectInitializer.Obj == this [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 1881]

Line 1881 of UObjectGlobals.cpp is:

check(!ObjectInitializer.Obj || ObjectInitializer.Obj == this);

I was only a couple hours into the project so I guess I’ll just make a new project and move my files over. Guess I’ll have to save backups frequently, I’ve only been using the engine a couple weeks and this is the second time somthing like this has happened. Thanks anyways for the help.

Hi Korimaru,

Do you still have the project that was having this issue? If so, would you be able to upload it so we can take a look at it?

Hi ,

I don’t have the exact project, but it happened to me again in a later version that I still have saved and I would be happy to upload it. Where should I upload it to? Also, I left a comment in TestCharacter.cpp regarding line 15, which I may have commented out after the crash in an attempt to save the project.

Hi Korimaru,

If you haven’t invested (time) in source control of some sort I’d suggest doing this early. Github would be the natural choice given unreal is distributed through it but svn, perforce etc would all be better than nothing. Then you commit to your source control frequently and have easy backup points.

Back in diagnosing land you can upload files in this thread using the paperclip icon at the top of you comment edit box. Its likely that the code crashing is something due to your actor initialization - the callstack and assertion look familiar to me but I’m afraid can’t remember the circumstances!

I’ll admit I’ve been pretty lazy when it comes to version control. All I’ve been doing was making a copies of my project on my hardrive. Probably about time I learned to use Github! Anyways, thanks for the help. As for the crashing, it’s been I while since I’ve broken the project so it’s not really a big deal anymore (for me, anyways). Every time it happened it was when I didn’t know exactly what I was doing was just trying things until it worked. I feel like what did it this time was one of my constructors:

ATestCharacter::ATestCharacter()
{
	Super::AGameCharacter();

That was before I refreshed my memory on c++ inheritance!

link text

Due to the upload limit, all I attached was the source files. Do you need the full project? If so, I can probably upload to my dropbox or something.

Hi Korimaru,

Thank you for providing the source code. I was able to reproduce the crash that you were seeing using the code that you provided. You were correct when you thought that the line Super::AGameCharacter(); may be the culprit. The error message that you were provided isn’t very clear about what is happening. However, when I tested this in our latest internal build of the Engine, the error message has been improved to be a bit clearer: “UObject() constructor called but it’s not the object that’s currently being constructed with NewObject. Maybe you trying to construct it on the stack which is not supported.”

If you want to be able to call the Super for the constructor, you would use this format instead:

ATestCharacter::ATestCharacter()
:Super()
{
	...
}