I have added a new class to my project (this is a sub-class of another class, I can edit this post to include the class hierarchy if requested), implemented that class as desired and then, compiled the project successfully in Visual Studio 2013 and launched the editor via ‘DebugGame’, this was yesterday.
I intended to go back today to add in some new features, so I load up the project in Visual Studio 2013, changing several names of variables (all of them are of type Bool), attempt to get into the editor with the ‘DebugGame’ Solution Configuration, the project once again compiles successfully, but after loading all the required symbols, upon trying to load into the editor, at 91% progress, a break point is thrown by UE4 at this line within GarbageCollection.cpp:
// We can't collect garbage during an async load operation and by now all unreachable objects should've been purged.
checkf( !Object->HasAnyFlags(RF_Unreachable), TEXT("%s"), *Object->GetFullName() );
Pressing continue, causes a message box with this message to be displayed:
Unhandled exception at 0x000007FEE9A40576 (UE4Editor-CoreUObject.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
As well as activating another break point, at the line GetClass()->AppendName(Result);
in UObjectBaseUtility.cpp:
/**
* Returns the fully qualified pathname for this object as well as the name of the class, in the format:
* 'ClassName Outermost.[Outer:]Name'.
*
* @param StopOuter if specified, indicates that the output string should be relative to this object. if StopOuter
* does not exist in this object's Outer chain, the result would be the same as passing NULL.
*
* @note safe to call on NULL object pointers!
*/
FString UObjectBaseUtility::GetFullName( const UObject* StopOuter/*=NULL*/ ) const
{
FString Result;
if( this != nullptr )
{
Result.Empty(128);
GetClass()->AppendName(Result);
Result += TEXT(" ");
GetPathName( StopOuter, Result );
// could possibly put a Result.Shrink() here, but this isn't used much in a shipping game
}
else
{
Result += TEXT("None");
}
return Result;
}
When trying to launch my project though the Unreal Launcher, the crash reporter for UE4 is shown instead, with these details of the issue:
MachineId: Edited out.
EpicAccountId: Edited out.
Access violation - code c0000005 (first/second chance not available)
UE4Editor_CoreUObject!UObjectBaseUtility::GetFullName() + 86 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectbaseutility.cpp:76]
UE4Editor_CoreUObject!FArchiveRealtimeGC::PerformReachabilityAnalysis() + 354 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:448]
UE4Editor_CoreUObject!CollectGarbage() + 1514 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1132]
UE4Editor_UnrealEd!UEditorEngine::Cleanse() + 458 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\editor.cpp:1877]
UE4Editor_UnrealEd!UEditorEngine::EditorDestroyWorld() + 491 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\editorserver.cpp:1823]
UE4Editor_UnrealEd!UEditorEngine::Map_Load() + 3180 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\editorserver.cpp:2179]
UE4Editor_UnrealEd!UEditorEngine::HandleMapCommand() + 349 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\editorserver.cpp:5680]
UE4Editor_UnrealEd!UEditorEngine::Exec() + 797 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\editorserver.cpp:5180]
UE4Editor_UnrealEd!UUnrealEdEngine::Exec() + 273 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\unrealedsrv.cpp:742]
UE4Editor_UnrealEd!FEditorFileUtils::LoadMap() + 789 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\filehelpers.cpp:1910]
UE4Editor_UnrealEd!FEditorFileUtils::LoadDefaultMapAtStartup() + 216 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\filehelpers.cpp:3070]
UE4Editor_UnrealEd!FUnrealEdMisc::OnInit() + 2263 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\unrealedmisc.cpp:299]
UE4Editor_UnrealEd!EditorInit() + 3254 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\unrealed.cpp:86]
UE4Editor!GuardedMain() + 926 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:133]
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]
This happened one time in the past, due to trying to cast the player’s pawn to a project’s GameMode, in an effort to get the GameMode, but I am not quite sure why this is occurring now, there are no invalid casts from what I can see, but I do believe there would seem to be an issue with a call to UObjectBaseUtility::GetFullName()
, as well as how my project is handled by the Garbage Collector.
I am using engine version 4.7.6 and I used the binary version of the engine, as installed by the launcher, I would most wholeheartedly appreciate any assistance I can get in resolving this matter.
Edit 1 - 16/08/2015: I have attempted to modify the constructors of all my classes, but some of them require what I was trying to remove to test if the constructors could manage without it (but they cannot, certain classes of mine that inherit from engine classes that require an FObjectInitializer function parameter, to be passed via Super to the super class’s constructor), that was my attempt at modifying the constructors of my custom classes, please tell me if I should attempt another change to these constructors, this would be greatly appreciated.