Crash and Cannot Open unreal project File

Project file is broken, I believe I was compiling at the time it crashed.
I cannot open the unreal project file it crashes with the same error.


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

UE4Editor_Engine!AActor::SetActorRotation() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\engine\private\actor.cpp:3300]
UE4Editor_TestProject_2537!UTestComp::UTestComp() [c:\users\nick\documents\unreal projects\testproject\source\testproject\testcomp.cpp:16]
UE4Editor_CoreUObject!UClass::CreateDefaultObject() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:2728]
UE4Editor_CoreUObject!UObjectLoadAllCompiledInDefaultProperties() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:795]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:869]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance::ExecuteIfSafe() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:1027]
UE4Editor_Core!TBaseMulticastDelegate::Broadcast() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:937]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:487]
UE4Editor_Projects!FModuleDescriptor::LoadModulesForPhase() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\projects\private\moduledescriptor.cpp:476]
UE4Editor_Projects!FProjectManager::LoadModulesForProject() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\projects\private\projectmanager.cpp:69]
UE4Editor!FEngineLoop::LoadStartupModules() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2577]
UE4Editor!FEngineLoop::PreInit() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:1992]
UE4Editor!GuardedMain() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\launch.cpp:127]
UE4Editor!GuardedMainWrapper() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
UE4Editor!WinMain() [d:\build++ue4+release-4.18+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
kernel32
ntdll

Hey there, can you show this area of code:

UE4Editor_TestProject_2537!UTestComp::UTestComp() [c:\users\nick\documents\unreal projects\testproject\source\testproject\testcomp.cpp:16] UE4Editor_CoreUObject!UClass::CreateDefaultObject()

I’ve deleted all my code inside of the .cpp besides the unreal actor boilerplate, but it’s still referring to a line that doesn’t exist. I also deleted the project saved and intermediate directories and opened it from the unreal file with no success. Is there another cached copy of the file it’s referring to?
Thanks


starting from line 16 inside testcomp.cpp:

// Called when the game starts
void UTestComp::BeginPlay()
{
	Super::BeginPlay();

	// ...
	
}

It was standard actor boilerplate… beginplay function and tick function… both empty.
I commented out everything but same error.
I deleted both the .cpp and header file but same exact error. Something is caching and I’m not sure where that is…

I would need more code than that, try commenting the code of all the functions except the Super calls and see if that helps.

Have you tried removing the use of the component from the code? Did you delete the binaries folder and regenerated the visual studio project when you deleted the saved and intermediate folder?

Could not open the solution because a file was missing in the intermediate directory. I don’t think I should have deleted that one as someone suggested… I gave up and deleted the entire project. Thanks for your help though.

You can delete the intermediate directory, you just have to regenerate the visual studio project by right clicking the uproject and choosing Generate visual studio project. If you have given up please close the issue by marking an answer correct. If the issue comes back again, come to this thread again and i’ll help you.