Bad allocation When using replace fill on terrain editor

Hi, I have an issue going on when I want to replace the terrain material. Recently, I noticed that when I tried to replace using a fill tool on a terrain editor and replacing it, it gives me an error that said “bad allocation” on the output. I’ve had 32 gigs of ram and 3600 mhz on my pc.
Error:

A video when I tried to replacing terrain material:
Swiss Alps - Roblox Studio (gyazo.com)
After waiting, it gives me this error again.
image
So, what is the solution to fix the error?