Cant open project after crash while compiling

Hi,

hope this isnt a duplicate, didnt find anything. Im new to this community, hello btw :slight_smile:

I was messing with the third person c++ template when i compiled my project after a code change. while compiling, the editor crashed (apparently from compiling). Since then, whenever i try to open the project, it loads to 70% and then crashes with the error message that ill attach at the end of this post.

I tried to delete the build, intermediate and saved folders aswell as the config folder but it didnt work.

Help greatly appreciated. Btw the engine is great :smiley:

Edit: The SetCamera1P method executes the following code:

void AThirdPersonTestCharacter::SetCamera1P()
{
	CameraBoom->TargetOffset = CameraOffset1P;
	CameraBoom->TargetArmLength = CameraTargetArmLength1P;
	GetMesh()->SetOwnerNoSee(true);

	/*Mesh1P->bOwnerNoSee = false;
	Gun1P->bOwnerNoSee = false;*/
}

(I dont know how to format this) I commented the part i added inbefore the crash.

edit 2: found similar error, but solution didnt work:

The thrown error:

Access violation - code c0000005 (first/second chance not available)

“”

UE4Editor_ThirdPersonTest_6691!AThirdPersonTestCharacter::SetCamera1P() [d:\projekte\braken\test\thirdpersontest\source\thirdpersontest\thirdpersontestcharacter.cpp:210]
UE4Editor_ThirdPersonTest_6691!AThirdPersonTestCharacter::AThirdPersonTestCharacter() [d:\projekte\braken\test\thirdpersontest\source\thirdpersontest\thirdpersontestcharacter.cpp:52]
UE4Editor_CoreUObject!UClass::CreateDefaultObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\class.cpp:2657]
UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:658]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:752]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance::ExecuteIfSafe() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:921]
UE4Editor_Core!TBaseMulticastDelegate::Broadcast() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:809]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\core\private\modules\modulemanager.cpp:426]
UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\projects\private\moduledescriptor.cpp:370]
UE4Editor_Projects!FProjectManager::LoadModulesForProject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\projects\private\projectmanager.cpp:53]
UE4Editor!FEngineLoop::LoadStartupModules() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launchengineloop.cpp:1989]
UE4Editor!FEngineLoop::PreInit() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launchengineloop.cpp:1495]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launch.cpp:110]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll

This may or may not work, but it worked for me a while back when I encountered a similar issue. Open the project folder and delete the “Build” “Intermediate” and “Saved” folders. Then try to open the project again, if it worked it should open normally.

1 Like

Hey spassbas-

Since the error seems to be an access violation in the SetCamera1P() function, I think the issue may be the GetMesh() inside the function. Can you comment out the GetMesh()->SetOwnerNoSee(true); line above and see if the project will open after compiling? If you are still unable to open the project, could you post the full AThirdPersonTestCharacter class (.h and .cpp) as a zip file?

Cheers

Thanks for your replies!

Black Phoenix: i already tried that but it didnt help.

: The GetMesh-Method should be fine. I started a new project and copy pasted most stuff, and it works. However, in a real project thats not an option.

i think the error came from Mesh1P->bOwnerNoSee = false; and Gun1P->bOwnerNoSee = false; i commented them, but after that only regenerated project files, not actually recompile afaik (dont know how :))

Do u still want the class zipped or will we just forget about this until it happens again?

If you’ve narrowed the cause to Mesh1P and Gun1P it would be best to make sure that there is a value set for these variables before use (adding an ‘if’ statement should help).