Engine Crashes attempt to edit actor component in a scene

Currently I a struggling with a bug that’s preventing me from properly debugging my game.

Whenever I attempt to make a BoxComponent not HiddenInGame within the editor it throws this access violation exception

Exception thrown at 0x00007FF951F15502 (UE4Editor-Renderer.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0x0000000000000040.

In BasePassRendering.cpp at this location

void FBasePassMeshProcessor::AddMeshBatch(const FMeshBatch& RESTRICT MeshBatch, uint64 BatchElementMask, const FPrimitiveSceneProxy* RESTRICT PrimitiveSceneProxy, int32 StaticMeshId)
{
	if (MeshBatch.bUseForMaterial)
	{
		// Determine the mesh's material and blend mode.
		const FMaterialRenderProxy* FallbackMaterialRenderProxyPtr = nullptr;
		const FMaterial& Material = MeshBatch.MaterialRenderProxy->GetMaterialWithFallback(FeatureLevel, FallbackMaterialRenderProxyPtr);

The component in question is called a UCameraBoundingBoxComponent and is a child of UActorComponent
ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)

class SIDESCROLLINGDEMO_API UCameraBoundingBoxComponent : public UActorComponent
{
    ...
	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "CameraBounds", meta = (AllowPrivateAccess = "true"))
		class UBoxComponent* BoundingBox;
    ...
}

Which is then later added to my character in the constructor

ASSDCharacter::ASSDCharacter(const FObjectInitializer& ObjectInitializer)
	: ACharacter(ObjectInitializer.SetDefaultSubobjectClass<USSDPlayerMovementComponent>(ACharacter::CharacterMovementComponentName))
{
    ...
    	CameraBounds = CreateDefaultSubobject<UCameraBoundingBoxComponent>(TEXT("CameraBounds"));
	verify(CameraBounds != nullptr);
    ...
}

I believe there’s some sort of setup with respect to actor components that I failed to do properly. I also have to reload the entire editor if I make changes to the actor component and attempt to do a hot reload, which I imagine I have to do in the constructor.

Is this a bug, or is there some way to toggle publically made values of actorcomponents from the editor?

Quick observation: Why are you setting a box component inside an actor component? Why not just inherit from a box component directly?

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
class SIDESCROLLINGDEMO_API UCameraBoundingBoxComponent: public UBoxComponent
{
	GENERATED_BODY()
	...
};

In relation to the crash, have you actually created the BoundingBox component in UCameraBoundingBoxComponent?

I was creating a camera bounding box as an actor component so I could use it with multiple characters. This seemed like the perfect time to abstract the camera logic from the player

The actor component also has other components as well to handle the camera logic. I can have it inherit from the three I guess, I just wanted a separate camera component and logic

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class SIDESCROLLINGDEMO_API UCameraBoundingBoxComponent : public UActorComponent
{
	GENERATED_BODY()

public:	
	// Sets default values for this component's properties
	UCameraBoundingBoxComponent();

protected:
	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "CameraBounds", meta = (AllowPrivateAccess = "true"))
		class UCameraComponent* CameraComponent;

	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "CameraBounds", meta = (AllowPrivateAccess = "true"))
		class UBoxComponent* BoundingBox;
	
	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "CameraBounds", meta = (AllowPrivateAccess = "true"))
		class UStaticMeshComponent* ViewPlane;

In my actor component constructor I have

UCameraBoundingBoxComponent::UCameraBoundingBoxComponent()
{
	// Set this component to be initialized when the game starts, and to be ticked every frame.  You can turn these features
	// off to improve performance if you don't need them.
	PrimaryComponentTick.bCanEverTick = true;
	
	BoundingBox = CreateDefaultSubobject<UBoxComponent>(TEXT("Bounds"));

	BoundingBox->SetRelativeLocation(FVector(0.f, 0.f,0.f));
	BoundingBox->InitBoxExtent(MainBoxSize);

	BoundingBox->SetUsingAbsoluteLocation(true);
	BoundingBox->SetUsingAbsoluteRotation(true);
    ...
}

After taking many breaks and revisiting this problem I found that removing Property Specifiers, ie EditAnywhere, from my actorComponents sub components stops UE4 from crashing.

	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "CameraBounds", meta = (AllowPrivateAccess = "true"))
		class UBoxComponent* BoundingBox;

...

	UPROPERTY(BlueprintReadWrite, Category = "CameraBounds", meta = (AllowPrivateAccess = "true"))
		class UBoxComponent* BoundingBox;

While this isn’t my ideal solution as I want to edit properties of actor components in different locations, I can mark this as resolved since the engine no longer crashes.