Reproduction steps:
1. Open the “user's attached project”
2. Open the “Game” Scene
3. Select the “Terrain” GameObject in the Hierarchy
4. Under the “Terrain” Component press the “Paint Details” button through the Inspector
5. Observe the crash
Reproducible with: 2021.3.34f1, 2022.3.19f1, 2023.2.9f1, 2023.3.0b6
Reproducible on: macOS Sonoma 14.2.1 (Intel)
Not reproducible on: no other environment tested
First few lines of Stack Trace:
{{#0 0x0000010f674217 in IsPatchClamped(int, int, DetailRenderMode, float, DetailDatabase const&) }}
{{#1 0x0000010f62862f in DetailDatabase::GetClampedPatches(dynamic_array<math::int2_storage, 0ul>&, float) const }}
{{#2 0x0000010f681c52 in TerrainDataScriptingInterface::GetClampedDetailPatches(TerrainData const&, float) }}
{{#3 0x0000010e420bdb in TerrainData_CUSTOM_GetClampedDetailPatches(ScriptingBackendNativeObjectPtrOpaque*, float) }}
{{#4 0x000001ab67dc4d in (wrapper managed-to-native) UnityEngine.TerrainData:GetClampedDetailPatches (UnityEngine.TerrainData,single) [
{0x7fc6fe3e8580}
+ 0xad] (0x1ab67dba0 0x1ab67dd2b) [0x15aec2a80 - Unity Child Domain]}}