ObjectMixer crashes Editor when changing values on 'LightingChannels' property on skeletal mesh components of a blueprint actor

The editor crashes when modifying a Lighting Channels checkbox through the Generic Object Mixer.

The crash occurs inside:

FLightingChannelsCustomization::OnButtonCheckedStateChanged()

with the assertion:

Assertion failed: IsValid()

[File: Runtime/Core/Public/Templates/SharedPointer.h]

[Line: 1133]

The issue appears to be caused by GetChildHandle() returning a valid handle before SetValue(), but returning an invalid handle immediately afterward. The current implementation retrieves the child handle multiple times and dereferences the second handle without validating it.

Reproduction Steps

  1. Open a level containing a StaticMeshComponent.
  2. Open Window → Light Mixer → Open Generic Object Mixer Instance.
  3. Add a filter that exposes a StaticMeshComponent.
  4. Add the Lighting Channels property column.
  5. Toggle one of the Lighting Channel checkboxes.

Currently I have stored the ChildHandle before SetValue and That prevent unreal editor crashing, hopefully this can be fix in the next patch before unreal 6.0

void FLightingChannelsCustomization::OnButtonCheckedStateChanged(ECheckBoxState NewState, uint32 ChildIndex) const
{
	if (LightingChannelsHandle.IsValid())
	{
		uint32 OutNumChildren = 0;
		LightingChannelsHandle->GetNumChildren(OutNumChildren);

		if (ChildIndex < OutNumChildren)
		{
			/*
			LightingChannelsHandle->GetChildHandle(ChildIndex)->SetValue(NewState == ECheckBoxState::Checked);
			LightingChannelsHandle->GetChildHandle(ChildIndex)->NotifyFinishedChangingProperties();
			LightingChannelsHandle->NotifyFinishedChangingProperties();
			*/

			/*
			auto ChildHandleA = LightingChannelsHandle->GetChildHandle(ChildIndex);
			UE_LOG(LogTemp, Warning, TEXT("Handle A valid=%d"), ChildHandleA.IsValid());
			ChildHandleA->SetValue(NewState == ECheckBoxState::Checked);

			auto ChildHandleB = LightingChannelsHandle->GetChildHandle(ChildIndex);
			UE_LOG(LogTemp, Warning, TEXT("Handle B valid=%d"), ChildHandleB.IsValid());
			ChildHandleB->NotifyFinishedChangingProperties();
			*/

			TSharedPtr<IPropertyHandle> ChildHandle = LightingChannelsHandle->GetChildHandle(ChildIndex);
			FPropertyAccess::Result Result = ChildHandle->SetValue(NewState == ECheckBoxState::Checked);
			UE_LOG(LogTemp, Warning, TEXT("SetValue completed"));

			ChildHandle->NotifyFinishedChangingProperties();
			UE_LOG(LogTemp, Warning, TEXT("ChildHandle NotifyFinishedChangingProperties completed"));

			LightingChannelsHandle->NotifyFinishedChangingProperties();
			UE_LOG(LogTemp, Warning, TEXT("LightingChannelsHandle NotifyFinishedChangingProperties completed"));
		}
	}
}




Steps to Reproduce
Assets to create:

  1. Blueprint actor asset
    1. Add a skeletal mesh component
    2. Add a static mesh component
    3. Add a point light
  2. Create an Blueprint asset inheriant from `Object Mixer Blueprint Object Filter`
    1. Add “LightingChannels” to override functions:
      1. GetForceAddedColumns()
      2. GetColumnsToShowByDefault()
    2. Add “SkeletalMeshComponent” To `GetObjectClassesToFilter()`
  3. Create a new basic level
  4. Drag in the Blueprint actor we created
  5. Open the ObjectMixerInstance from Light mixer
    1. Select the Object Mixer Bluepritn Object Filter that we created
    2. Click on apply
  6. Changing LightingChannels properties on the skeletal mesh component would trigger a crash on editor

Hi Wei,

Let’s is a known bug. I’ve requested UE-364619 to be publically visible so you can follow the status.