Download

Assertion failed: IsValidLowLevel() in UObject\Obj.cpp] [Line: 667]

My app sometimes crashed with following stack:



Assertion failed: IsValidLowLevel() [File:D:\Build\++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Obj.cpp] [Line: 667] 



UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:440]
UE4Editor_CoreUObject!UObject::ConditionalBeginDestroy() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\coreuobject\private\uobject\obj.cpp:668]
UE4Editor_HuaiKX_6834_Win64_DebugGame!GroupEntity::Clear() [d:\workspace\unreal_project\huaikongxin\program\server\huaikxsrv\source\huaikx\logic\private\pvpmodule\groupentity.cpp:142]

and this issue occurs at AllUnits_*->ConditionalBeginDestroy(); of my code:


void GroupEntity::Clear()
{
	for (int i = 0; i < WARRIOR_COUNT_MAX; i++)
	{
		if (AllUnits_*)
		{
			AllUnits_*->ConditionalBeginDestroy();
			AllUnits_* = NULL;
		}
	}
	}
}


but I can’t reproduce this issue, it occurs irregularly. I wonder what situation would make an Actor Invalid and not NULL.

If don’t invoke ConditionalBeginDestroy() when IsValidLowLevel() return false, does it cause memory leak?