After migrating from 5.5.4 to 5.6.1 we are getting spam logs complaining that our Child Actor Components are not valid
i.e.: LogActor: Loaded Actor (AttachedChildActor_GEN_VARIABLE_BP_ItemSpawnLocation_C_CAT) with IsValid() == false
Looking at the issue it seems that in ‘StaticDuplicateObjectEx(FObjectDuplicationParameters & Parameters)’ when calling ‘DuplicatedObjectAnnotation.GetAnnotation( OrigObject )’ the returned annotation has the RF_MirroredGarbage flag. I am seeing that the annotations in the AnnotationMap do not contain that flag, however the AnnotationCacheValue does.
I see that the cache behavior has changed in CL 39957580 “Improve transactional safety of UObject annotations.” but not 100% sure if that is the cause of the messages.
This spam does not seem to affect runtime and everything seems to behave as before the upgrade but I’d prefer to understand where the issue lies, even if the solution is to silence the log in Actor.cpp.
This log spam has been addressed in CL 45050637, which removes the unnecessary log message when non-valid AActor instances execute PostLoad. The fix will be included in UE 5.7, and you can already validate the change in the 5.7 Preview available through the Epic Games Launcher.
Originally, this log was introduced as a safeguard for a bug fixed many years ago. The engine team has now confirmed it is no longer needed, as it can generate significant log spam.
For reference, here’s the CL summary: Actor: Remove the message logged when a non-valid AActor (MarkAsGarbage was called on it) is executing PostLoad. The message is causing log spam during the cook of large projects (17k out of 250k log lines) due to its occurrence whenUChildActorComponent::Serialize marks a duplicated Actor as garbage to suppress the use of the duplicated object. The bug that originally prompted the log message (per CL 67832) was fixed many years ago.
If you’d like to suppress the logs before upgrading, you can safely remove the IsValidChecked(this) bracket and the associated UE_LOG call in AActor::PostLoad as a temporary workaround.
Please let me know if this clarifies the situation and helps your case.