Assertion failed: IsValidLowLevel() in UObject\Obj.cpp] [Line: 667]
My app sometimes crashed with following stack:
and this issue occurs at AllUnits_[i]->ConditionalBeginDestroy(); of my code:
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?
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:
answered Aug 01 '16 at 02:59 PM
ImVawx ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here