Unreal engine crash on start

Hello. Earlier today I tried to compile some c++ code and the engine crashed, since that happend to me i cant start up unreal engine anymore. this is the error that i get: Screenshot by Lightshot

Or, just the error message if you prefer:

MachineId:065C0CBC43724C115A73DA81502FBAAB
EpicAccountId:74454bdccffa4c9598d402a9bfa6d134

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

"Fatal error: [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2315] 
ObjectProperty //Scrip

KERNELBASE
UE4Editor_Core!FOutputDeviceWindowsError::Serialize() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor_Core!FOutputDevice::Logf__VA() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
UE4Editor_Core!FDebug::AssertFailed() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\misc\outputdevice.cpp:355]
UE4Editor_CoreUObject!FObjectInitializer::PostConstructInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:2315]
UE4Editor_CoreUObject!FObjectInitializer::~FObjectInitializer() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:2179]
UE4Editor_CoreUObject!UClass::CreateDefaultObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\class.cpp:2591]
UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:729]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:820]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:921]
UE4Editor_Core!TBaseMulticastDelegate<void>::Broadcast() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:1031]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\core\private\modules\modulemanager.cpp:431]
UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\projects\private\moduledescriptor.cpp:370]
UE4Editor_Projects!FProjectManager::LoadModulesForProject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\projects\private\projectmanager.cpp:52]
UE4Editor!FEngineLoop::LoadStartupModules() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:1922]
UE4Editor!FEngineLoop::PreInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launchengineloop.cpp:1444]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\launch.cpp:110]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.8\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

Hey shaked6540-

Could you post the log files from the crash as well? Additionally could you post the code that was changed (what it was originally and what changed just before the crash)? It is likely that whatever was changed in code is what caused the crash. If you revert the code changes and compile can you then open the project?

Cheers

Where are the log files located at? And I didnt change anything in the engine itself, i created a new character and proceed to edit the code, when i finished i tried to complie it and puff! the engine crashes. if you say it matters, here is the code:

   `#pragma once  
    #include "GameFramework/Character.h"  
   #include "NPC.generated.h"  
    
    UCLASS()  
    class DEATHRUN_API ANPC : public ACharacter  
    {  
    	GENERATED_BODY()  
        public:  
       	// Sets default values for this character's properties  
       	ANPC();  

    	// Called when the game starts or when spawned  
   	virtual void BeginPlay() override;  
    
    	// Called every frame  
    	virtual void Tick( float DeltaSeconds ) override;  
    
    	// Called to bind functionality to input  
       	virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;  
    
      UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision)
      TSubobjectPtr<class USphereComponent> ProxSphere;  
    
    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = NPCMessage)
    	FString NpcMessage;  
    };`

Nothing that should do that to the engine, right? the worst thing that might happen here is just compile error. (which shouldnt happen either)

Log files can are located inside the Saved->Logs folder inside the project directory. I see that the UPROPERTY() macro’s and variables were added to your .h file, was there anything that was added to the .cpp file as well? If the crash occurred when compiling code it is likely that the changes are causing an issue. If you revert the changes and compile again are you then able to open the project?

Nothing was added to the .cpp file, i tried deleting the new lines from the .h file, and I still get the same crash (or at least i think its the same), i attached the log files here (the latest log file + the log file after i deleted the new lines)
link text
link text
link text
link text

Hey shaked6540-

According to the files there may be an issue with your AAvatar class. Were there any changes made to this class prior to the crash? If possible could you send a copy of your project so I can take a closer look at the code and the crash? If necessary you can post the project on dropbox and send me a private message on the forums () with the link to download it.

Cheers

I cant upload it here, so I uploaded it to Google Drive, Hope thats good enough:
https://drive.google.com/file/d/0B_5SL8LV9lgEbUt4OFpCSHY4aFk/view?usp=sharing
Please tell me what went wrong in that project, so I wont do that again in the future.

I’ve just had the exact same issue (not checked your log files yet though).

The problem for me was that TSubobjectPtr should no longer be used, and you should just use C++ standard pointers now.

So, for your macros, I’d suggest trying to change to the following:

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision)
	USphereComponent* ProxSphere;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = NPCMessage)
	FString NpcMessage;

Thank you, it works! :slight_smile: