WorldPartitionChangelistValidator incorrectly flags actors referencing the level script actor as invalid

We have ran into a very annoying bug with World Partition and CL validation- if you have an actor that references the level script in the world (e.g. it has an event bound on the level script graph) it will fail changelist validation 100% of the time (however it will pass map checks just fine).

From some quick poking around the major difference in behavior between the map check and the changelist validation is that the FStreamingGenerationMapCheckErrorHandler class derives from ITokenizedMessageErrorHandler, which explicitly ignores throwing errors from ‘non-existent actors’ (a case that the level script actor falls into as it’s not an external actor, though the comment doesn’t seem to imply stuff like this is what it’s there to ignore)-

// Don't report invalid references to non-existing actors as it can happen in valid scenarios, as the linker code will silently null out references when loading actors with missing
// references.
if (ReferenceActorDescView)

The changelist validator however doesn’t derive from ITokenizedMessageErrorHandler and rolls it’s own OnInvalidReference implementation which does not make this exception.

FText CurrentError = FText::Format(LOCTEXT("DataValidation.Changelist.WorldPartition.InvalidReference", "Actor {0} has an invalid reference to {1}"),
	FText::FromString(GetFullActorName(ActorDescView)),
	FText::FromString(ReferenceActorDescView ? GetFullActorName(*ReferenceActorDescView) : ReferenceGuid.ToString()));

And will simply print the GUID for the ‘non existent actor’.

The changelist validator can be ‘fixed’ by simply checking that ‘ReferenceActorDescView’ is valid before logging an error (to match the map check validator) but I’m not sure this would be considered a good change. (On the flip side you can break the MapCheck validator to be broken in the same way by removing the if check on ReferenceActorDescView in ITokenizedMessageErrorHandler::OnInvalidReference).

An official fix for this (or advice on how to ‘properly’ fix it/blessing on the UWorldPartitionChangelistValidator::OnInvalidReference change) would be appreciated. Thanks!

[Attachment Removed]

Steps to Reproduce
From scratch:

  1. Have a project under source control
  2. Drop a simple cube into an empty WP map
  3. Open the level script with the cube selected and add an event for ‘on overlap’ to the level script graph
  4. Save everything
  5. Map check, notice no errors are called out
  6. Validate the changelist in UE’s source control- notice it calls out an invalid reference to an actor (and the actor is only called out via GUID)

With the attached project:

  1. Put the attached project under source control so you can do CL validation.
  2. Mark the files in /Content for add
  3. Open the project
  4. Map check the ‘Map’ map, it will pass
  5. Validate the changelist adding the /Content folder, it will fail validation.
    [Attachment Removed]

Hi there, thank you for providing the repro steps & minimal project. I was able to confirm this using both methods. I am attempting to submit a bug report for this issue however there seems to be a technical issue at the moment of writing. I will post another reply here when the issue is resolved & I have submitted the report.

Thank you,

Louis

[Attachment Removed]

Hello again,

The bug report has now been submitted. Once it is publicly tracked you will be able to view it here.

Cheers,

Louis

[Attachment Removed]