Hi. I have an assertion failure at Play in PIE (Debug Editor, build from source) from any landscape height field collision component.
There is a callstack:
UE4Editor-CoreUObject-Win64-Debug.dll!FUObjectAnnotationSparseSearchable::AddAnnotation(const UObjectBase * Object, FUniqueObjectGuid Annotation) Line 303 C++
UE4Editor-CoreUObject-Win64-Debug.dll!FLazyObjectPtr::PossiblySerializeObjectGuid(UObject * Object, FArchive & Ar) Line 142 C++
UE4Editor-CoreUObject-Win64-Debug.dll!UObject::Serialize(FArchive & Ar) Line 958 C++
UE4Editor-Engine-Win64-Debug.dll!UActorComponent::Serialize(FArchive & Ar) Line 1627 C++
UE4Editor-Engine-Win64-Debug.dll!USceneComponent::Serialize(FArchive & Ar) Line 1809 C++
UE4Editor-Engine-Win64-Debug.dll!UPrimitiveComponent::Serialize(FArchive & Ar) Line 586 C++
UE4Editor-Landscape-Win64-Debug.dll!ULandscapeHeightfieldCollisionComponent::Serialize(FArchive & Ar) Line 1247 C++
UE4Editor-CoreUObject-Win64-Debug.dll!StaticDuplicateObjectEx(FObjectDuplicationParameters & Parameters) Line 1823 C++
UE4Editor-CoreUObject-Win64-Debug.dll!StaticDuplicateObject(const UObject * SourceObject, UObject * DestOuter, const FName DestName, EObjectFlags FlagMask, UClass * DestClass, EDuplicateForPie DuplicateForPIE, EInternalObjectFlags InternalFlagsMask) Line 1716 C++
UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::CreatePIEWorldByDuplication(FWorldContext & WorldContext, UWorld * InWorld, FString & PlayWorldMapName) Line 3534 C++
UE4Editor-Engine-Win64-Debug.dll!UGameInstance::InitializePIE(bool bAnyBlueprintErrors, int PIEInstance, bool bRunAsDedicated) Line 158 C++
UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::CreatePIEGameInstance(int PIEInstance, bool bInSimulateInEditor, bool bAnyBlueprintErrors, bool bStartInSpectatorMode, bool bRunAsDedicated, float PIEStartTime) Line 2730 C++
UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::PlayInEditor(UWorld * InWorld, bool bInSimulateInEditor) Line 2324 C++
UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::StartQueuedPlayMapRequest() Line 1100 C++
UE4Editor-UnrealEd-Win64-Debug.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1251 C++
UE4Editor-UnrealEd-Win64-Debug.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 370 C++
UE4Editor-Win64-Debug.exe!FEngineLoop::Tick() Line 2643 C++
...
TAnnotation ExistingAnnotation = this->GetAnnotation(Object);
if (!Annotation.IsDefault())
{
int32 NumExistingRemoved = InverseAnnotationMap.Remove(ExistingAnnotation);
**checkSlow(NumExistingRemoved == 0);**
}
Land was created in 4.11
> Assertion failed: NumExistingRemoved
> == 0 [File:d:\projects\UnrealEngine\UnrealEngine.git\Engine\Source\Runtime\CoreUObject\Public\UObject\UObjectAnnotation.h]
> [Line: 303]
>
> UE4Editor-Win64-Debug.exe has
> triggered a breakpoint.
where NumExistingRemoved == 1 instead 0
I have the same issue in debug mode in PIE, but for other actors in some legacy maps. They work in non-debug mode though … (probably checkSlow is compiled out there).
We’re experiencing the exact same issue with all of our maps after upgrading to 4.11. They all worked fine in 4.10 and run fine in Development builds, but this is preventing us from running any of our maps in debug.
A bit more info: I deleted the landscape just so I could run the game and debug something … and this time I got the same crash, but on a static mesh. So it’s not strictly limited to landscapes.
@ v.s. I followed your instructions and did not the get crash to occur. I will say I toggled a breakpoint error that occurred when I ran in debug mode while launching the project. However, I was able to open and play in editor without getting a crash.
Could anyone experiencing this issue provide me with a their official crashlogs for this project so I can investigate this further?
This problem is actual for debug mode only. But it is present in development build too. But wihout triggering of the assertion. We can not normally work on in the debug editor, and we can not run any map in PIE with the landscape without triggering this assertion. There is a new situation which was not until 4.11. Is this a normal behavior?
There is a problem with a duplication of ALandscapeProxy class inside PIE. Special handling is required to serialize this class because Guid copies detected at runtime StaticDuplicateObjectEx for LandscapeComponents and CollisionComponents. I think that this case should be considered.
Could you provide me with some simple steps, your crash logs, and an explanation of what you are doing when the crash occurred?
I am trying to get this issue to appear on my end so I can report the bug, but so far I have been given a project where the issue is not occurring. If I can get your crash logs, and there is enough information, I can enter a report using the crash reporter information.
There is an assertion failure but not a classic crash as a wrong pointer, etc. Assertion occurs ONLY in the Debug Build of the editor. This problem does not come out itself in the form of the classic crash in Development Build, but points to the existing problem of copying objects.
The reason that bug was entered was because the technician was able to get a repro case from the instructions you provided. If I cannot get the issue to reproduce on my end, there is not enough information to generate the bug report. The bug that was entered also dealt with a crash, and did not address the assert specifically.
So either the DBC check is not valid, or there is some other underlying issue resulting in NumExistingRemoved not being zero. I’ve not had the time to investigate the UE code further to understand the intention of this check. So our work around has been to simply comment out the checkSlow(NumExistingRemoved == 0).
Our callstack is same as OP e.g.:
UE4Editor-CoreUObject-Win64-Debug.dll!FUObjectAnnotationSparseSearchable<FUniqueObjectGuid,1>::AddAnnotation(const UObjectBase * Object, FUniqueObjectGuid Annotation) Line 303 C++
.............. etc.
i.e. check fails at line Engine\Source\Runtime\CoreUObject\Public\UObject\UObjectAnnotation.h 303 marked ** below.
Thank you for the reproduction steps. I was able to reproduce the crash in a version of 4.11.2 that I downloaded from Github but did not get the same results on our latest internal build. I’ll be testing on 4.12 shortly to see if it occurs there. In the meantime, would you be able to download the latest Promoted build from Github and see if you’re experiencing the crash on that branch?