sbox-issues icon indicating copy to clipboard operation
sbox-issues copied to clipboard

Editor.TerrainEditor.TerrainEditorTool.OnUpdate exception: Cannot be less than 1 (Parameter 'threadsX')

Open EternalDawn1 opened this issue 1 month ago • 2 comments

Branch

staging

Where did it crash?

Editor

Version / Commit

November

Minimal Repro Steps

  1. create a 3D Terrain component
  2. 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

Image

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

EternalDawn1 avatar Nov 17 '25 19:11 EternalDawn1

setting back the numbers to the normal , lets you edit the terrain normally

EternalDawn1 avatar Nov 17 '25 19:11 EternalDawn1

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.

K3rhos avatar Nov 19 '25 16:11 K3rhos