TArray or subobject limit?

I’m trying to generate a maze. I can create individual wall blocks like this:

.h

UPROPERTY()
TArray < UStaticMeshComponent*> MazeWallsMesh;

.cpp

MazeWallsMesh.Add(CreateDefaultSubobject< UStaticMeshComponent>(TEXT(“Grid Wall Mesh %d”), 0));
MazeWallsMesh.Add(CreateDefaultSubobject< UStaticMeshComponent>(TEXT(“Grid Wall Mesh %d”), 1));

but when i use a for loop my game crashes

for (int32 Index = 0; Index < Size; Index++)
{
MazeWallsMesh.Add(CreateDefaultSubobject< UStaticMeshComponent>(TEXT(“Grid Wall Mesh %d”), Index));
}

any idea of what would be the problem?