Add grass impossible

When I want to add a grass texture on a terrain, I have these messages:

IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEditor.TerrainTools.DetailScatterTool+<>c__DisplayClass29_0.b__3 (System.Int32 i) (at ./Library/PackageCache/com.unity.terrain-tools@5.0.3/Editor/TerrainTools/DetailsScatterTool.cs:408) DistributionSliderGUI.CreateDistributionInfos (System.Int32 numElements, UnityEngine.Rect area, System.Func2[T,TResult] nameGen, System.Func2[T,TResult] heightGen, System.Func`2[T,TResult] indexGen) (at ./Library/PackageCache/com.unity.terrain-tools@5.0.3/Editor/TerrainTools/GUI/DistributionSliderGUI.cs:101) UnityEditor.TerrainTools.DetailScatterTool.DetailsControlGUI (UnityEngine.Terrain terrain) (at ./Library/PackageCache/com.unity.terrain-tools@5.0. 3/Editor/TerrainTools/DetailsScatterTool.cs:407) UnityEditor.TerrainTools.DetailScatterTool.OnInspectorGUI (UnityEngine.Terrain terrain, UnityEditor.TerrainTools.IOnInspectorGUI editContext) (at ./Library/PackageCache/com.unity.terrain-tools@5.0.3/Editor/TerrainTools/DetailsScatterTool.cs:222) UnityEditor.TerrainInspector.OnInspectorGUI () (at <64861216782042de93237b5c061bff1b>:0) InspectorElement+<>c__DisplayClass72_0.b__0 () (at <64861216782042de93237b5c061bff1b>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)