Hi,
I have been having a GC crash in EndPlayMap when stopping a PIE session, but ONLY after changing a a value in the Default Panel for a Object while the game is running (see section below):
I have tried to create a minimal reproduction case, but I haven’t managed to do so.
I managed to reduce the number of referenced objects during shutdown by changing header declaration of my object from:
UPROPERTY(BlueprintReadOnly,Category="Skill")
class AEvilPawn* OwningPawn;
to
UPROPERTY(BlueprintReadOnly,NonTransactional,Category="Skill")
TWeakObjectPtr<class AEvilPawn> OwningPawn;
The end of my Log-file looks like this:
[2015.01.19-18.10.02:266][334]LogReferenceChain: Searching referencers for StartLevel. This may take several minutes.
[2015.01.19-18.10.02:736][334]LogReferenceChain: Generating reference graph ...
[2015.01.19-18.10.02:742][334]LogReferenceChain: Level 0 has 10 nodes ...
[2015.01.19-18.10.02:754][334]LogReferenceChain: Level 1 added 74 nodes ...
[2015.01.19-18.10.02:768][334]LogReferenceChain: Level 2 added 287 nodes ...
[2015.01.19-18.10.02:781][334]LogReferenceChain: Level 3 added 307 nodes ...
[2015.01.19-18.10.02:793][334]LogReferenceChain: Level 4 added 30 nodes ...
[2015.01.19-18.10.02:805][334]LogReferenceChain: Level 5 added 14 nodes ...
[2015.01.19-18.10.02:817][334]LogReferenceChain: Level 6 added 0 nodes ...
[2015.01.19-18.10.02:817][334]LogReferenceChain: Generating reference chains ...
[2015.01.19-18.10.02:818][334]LogReferenceChain:
[2015.01.19-18.10.02:818][334]LogReferenceChain: External Referencers:
[2015.01.19-18.10.02:818][334]LogReferenceChain:
[2015.01.19-18.10.02:819][334]LogReferenceChain: (root) UnrealEdEngine /Engine/Transient.UnrealEdEngine_0->Trans
[2015.01.19-18.10.06:294][334]LogReferenceChain: TransBuffer /Engine/Transient.TransBuffer_0->UE4Editor-UnrealEd.dll!UTransBuffer::AddReferencedObjects() (0x000007fee6833ba0) + 0 bytes [c:\programmering\drevil\ue4_engine\engine\source\editor\unrealed\private\editortransaction.cpp:384]
[2015.01.19-18.10.06:295][334]LogReferenceChain: BP_Castle_C /Game/Maps/UEDPIE_0_StartLevel.StartLevel:PersistentLevel.BP_Castle_C_1->Outer
[2015.01.19-18.10.06:295][334]LogReferenceChain: Level /Game/Maps/UEDPIE_0_StartLevel.StartLevel:PersistentLevel->OwningWorld
[2015.01.19-18.10.06:295][334]LogReferenceChain: (target) World /Game/Maps/UEDPIE_0_StartLevel.StartLevel
[2015.01.19-18.10.06:422][334]LogWindows:Error: Windows GetLastError: The operation completed successfully. (0)
[2015.01.19-18.10.06:422][334]LogCrashTracker:
[2015.01.19-18.10.06:712][334]LogCrashTracker:
[2015.01.19-18.10.06:712][334]LogWindows: === Critical error: ===
Fatal error: [File:C:\Programmering\DrEvil\UE4_Engine\Engine\Source\Developer\MessageLog\Private\Model\MessageLogListingModel.cpp] [Line: 70]
Critical Error PlayerState /Game/Maps/UEDPIE_0_StartLevel.StartLevel:PersistentLevel.PlayerState_25 Object from PIE level still referenced. Shortest path from root: (Object is not currently rooted)
KERNELBASE.dll!UnknownFunction (0x000007fefd62940d) + 0 bytes [UnknownFile:0]
UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() (0x000007feec62080d) + 0 bytes [c:\programmering\drevil\ue4_engine\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor-Core.dll!FMsg::Logf__VA() (0x000007feec4bf73f) + 0 bytes [c:\programmering\drevil\ue4_engine\engine\source\runtime\core\private\misc\outputdevice.cpp:526]
UE4Editor-MessageLog.dll!FMessageLogListingModel::AddMessageInternal() (0x000007fedfc410d5) + 150 bytes [c:\programmering\drevil\ue4_engine\engine\source\developer\messagelog\private\model\messageloglistingmodel.cpp:70]
UE4Editor-MessageLog.dll!FMessageLogListingModel::AddMessages() (0x000007fedfc411cf) + 79 bytes [c:\programmering\drevil\ue4_engine\engine\source\developer\messagelog\private\model\messageloglistingmodel.cpp:89]
UE4Editor-Core.dll!FMessageLog::~FMessageLog() (0x000007feec433ab5) + 58 bytes [c:\programmering\drevil\ue4_engine\engine\source\runtime\core\private\logging\messagelog.cpp:91]
UE4Editor-UnrealEd.dll!UEditorEngine::EndPlayMap() (0x000007fee69d7606) + 414 bytes [c:\programmering\drevil\ue4_engine\engine\source\editor\unrealed\private\playlevel.cpp:232]
UE4Editor-UnrealEd.dll!UEditorEngine::Tick() (0x000007fee678c10a) + 0 bytes [c:\programmering\drevil\ue4_engine\engine\source\editor\unrealed\private\editor.cpp:1468]
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() (0x000007fee6c1d9d6) + 0 bytes [c:\programmering\drevil\ue4_engine\engine\source\editor\unrealed\private\unrealedengine.cpp:307]
UE4Editor.exe!FEngineLoop::Tick() (0x000000013f39b564) + 0 bytes [c:\programmering\drevil\ue4_engine\engine\source\runtime\launch\private\launchengineloop.cpp:2214]
UE4Editor.exe!GuardedMain() (0x000000013f38f9de) + 0 bytes [c:\programmering\drevil\ue4_engine\engine\source\runtime\launch\private\launch.cpp:131]
UE4Editor.exe!GuardedMainWrapper() (0x000000013f38fa4a) + 5 bytes [c:\programmering\drevil\ue4_engine\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() (0x000000013f39cbb9) + 17 bytes [c:\programmering\drevil\ue4_engine\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor.exe!__tmainCRTStartup() (0x000000013f39db79) + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
kernel32.dll!UnknownFunction (0x00000000774d59ed) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x000000007760c541) + 0 bytes [UnknownFile:0]
ntdll.dll!UnknownFunction (0x000000007760c541) + 0 bytes [UnknownFile:0]
However, I have found some really strange reference graphs that makes me confused, where the reference graph looks like this:
[2015.01.19-18.35.48:543][ 69]LogReferenceChain: (root) UnrealEdEngine /Engine/Transient.UnrealEdEngine_0->Trans
[2015.01.19-18.35.48:825][ 69]LogReferenceChain: TransBuffer /Engine/Transient.TransBuffer_0->UE4Editor-UnrealEd.dll!UnknownFunction (0x000007fed3cdcdc0) + 0 bytes [UnknownFile:0]
[2015.01.19-18.35.48:825][ 69]LogReferenceChain: BP_Charge_C /Engine/Transient.BP_Charge_C_0->CallFunc_GetWeapon_ReturnValue2
[2015.01.19-18.35.48:825][ 69]LogReferenceChain: BP_Spear_C /Game/Maps/UEDPIE_0_StartLevel.StartLevel:PersistentLevel.BP_Spear_C_0->Outer
[2015.01.19-18.35.48:826][ 69]LogReferenceChain: Level /Game/Maps/UEDPIE_0_StartLevel.StartLevel:PersistentLevel->OwningWorld
[2015.01.19-18.35.48:826][ 69]LogReferenceChain: (target) World /Game/Maps/UEDPIE_0_StartLevel.StartLevel
However, changing this BP:
to this BP:
removes this error.
The GetWeapon function that is refered is just a small C++ helper that looks like this:
int32 UEvilSkill::GetDamage_Implementation() const
{
AEvilWeapon* Weapon = GetWeapon();
check( Weapon );
return Weapon->GetDamage() * DamageMultiplier;
}
So that I get less nodes in my blueprints.
I have tried this in both 4.6.1 and 4.7.p3
Do you have any recommendations on how to track down these kind of garbage collection crashes. As the reference graph is really misleading as it’s the shortest path, and not the path that makes the error occur. Is there any way to show a more exhaustive reference graph.
Also, is there a way for me to track down why the BP_Castle instance happens to go into the Trans-buffer (as that’s seems to be the reason for the crash) when it’s totally unrelated to the BP_Charge instance that I change runtime.
If you want, then I can send you the entire project where you can see the issue, but it’s around 600mb unzipped.
I’m sorry for the long and really confusing post, but I have a really hard time describing the issue and collecting the relevant information.
Cheers,