Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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_[i]->ConditionalBeginDestroy(); of my code:

 void GroupEntity::Clear()
     for (int i = 0; i < WARRIOR_COUNT_MAX; i++)
         if (AllUnits_[i])
             AllUnits_[i] = 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?

Product Version: UE 4.12
more ▼

asked Jul 31 '16 at 05:37 AM in Bug Reports

avatar image

216 12 24 30

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey 笑傲江湖-DA,

My best guess is that the current "AllUnits_[ i ]" element may still be a valid pointer but a invalid UObject, resulting in the Assert on IsValidLowLevel( ).

If AllUnits_ is a TArray, you could change the loop from relying on WARRIOR_COUNT_MAX to something like:

 for (auto& Unit : AllUnits_)
    Unit->ConditionalBeginDestroy( );
    Unit = NULL;


 for( int32 = Index = 0; Index < AllUnits_.Num( ); Index++ )
     AllUnits_[Index]->ConditionalBeginDestroy( );
     AllUnits_[Index] = NULL;

more ▼

answered Aug 01 '16 at 02:59 PM

avatar image

ImVawx ♦♦ STAFF
6.8k 114 17 127

avatar image 笑傲江湖-DA Aug 01 '16 at 04:35 PM

Thx so much for your help! I will try it later. Have a nice day!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question