Calling a public function in C++ makes editor freeze


	// Called every frame
	virtual void Tick(float DeltaTime) override;

	UFUNCTION(BlueprintNativeEvent, Category = "Special Game Events")
	void SetTileMaterial(class UMaterialInterface* TileMaterial);
	virtual void SetTileMaterial_Implementation(class UMaterialInterface* TileMaterial);

        void myTestFunction();

In a Tile.cpp file, a match 3 game project, as long as there’s a call to the SetTileMaterial() function or myTestFunction(), the Editor will freeze forever, but if I make the function protect, the problem will be gone.

I’m new to UE coding, any hint to help me solve this freeze?