Editor.TerrainEditor.TerrainEditorTool.OnUpdate exception: Cannot be less than 1 (Parameter 'threadsX')
Branch
staging
Where did it crash?
Editor
Version / Commit
November
Minimal Repro Steps
- create a 3D Terrain component
- use the Terrain Tool , it works ! 3). adjust the Terrain Size / Height with a 0 ( 199680---> 1996800 , || Terrain --> Settings --> Size --> Terrain Size /Height <| 4.) giving out an an Error and Editor crashes in normal build | Staging no crash
Logs
Editor.TerrainEditor.TerrainEditorTool.OnUpdate exception: Cannot be less than 1 (Parameter 'threadsX') System.ArgumentException: Cannot be less than 1 (Parameter 'threadsX') at Sandbox.ComputeShader.Dispatch(Int32 threadsX, Int32 threadsY, Int32 threadsZ) at Editor.TerrainEditor.BaseBrushTool.OnPaint(Terrain terrain, TerrainPaintParameters paint) in R:\steamlibrary\steamapps\common\sbox\addons\tools\code\Scene\Terrain\Tools\BaseBrushTool.cs:line 136 at Editor.TerrainEditor.BaseBrushTool.OnUpdate() in R:\steamlibrary\steamapps\common\sbox\addons\tools\code\Scene\Terrain\Tools\BaseBrushTool.cs:line 102 at Editor.EditorTool.Frame(CameraComponent camera) in R:\steamlibrary\steamapps\common\sbox\addons\tools\code\Scene\Tools\EditorTool.cs:line 103
&
Editor.TerrainEditor.TerrainEditorTool.OnUpdate exception: Cannot be less than 1 (Parameter 'threadsX') System.ArgumentException: Cannot be less than 1 (Parameter 'threadsX') at Sandbox.ComputeShader.Dispatch(Int32 threadsX, Int32 threadsY, Int32 threadsZ) at Editor.TerrainEditor.BaseBrushTool.OnPaint(Terrain terrain, TerrainPaintParameters paint) in R:\steamlibrary\steamapps\common\sbox\addons\tools\code\Scene\Terrain\Tools\BaseBrushTool.cs:line 136 at Editor.TerrainEditor.BaseBrushTool.OnUpdate() in R:\steamlibrary\steamapps\common\sbox\addons\tools\code\Scene\Terrain\Tools\BaseBrushTool.cs:line 102 at Editor.EditorTool.Frame(CameraComponent camera) in R:\steamlibrary\steamapps\common\sbox\addons\tools\code\Scene\Tools\EditorTool.cs:line 103
Steam Id
76561198040689780
OS / Platform
Windows 11
OS Version / Build
No response
Hardware & Drivers
i5 8400 GTX 1070 WIN 11
Additional context
it appears in both staging and normal
setting back the numbers to the normal , lets you edit the terrain normally
Oh yeah this bug is really old ! (Probably here since terrain exists) I was kinda lazy to report it XD bcs I'm not editing the terrain that much. But yeah I noticed that it's doing that if the tool brush is too small or too big or something like that, I was changing the size of the brush to something around ~1000 to avoid crashing iirc.