How to reproduce:
1. Open the “ListBug.zip“ project
2. Select the “new behaviour script“ Scriptable Object
3. Add at least 2 elements to the asset in the Inspector
4. Restart the project
5. Select the last element of the list
6. Press the Spacebar
7. Observe the Console window
Expected results: No “StackOverflowException“ errors are thrown in the Console and the Editor does not freeze
Actual results: “StackOverflowException“ is thrown in the Console and the Editor becomes unresponsive
Reproducible in: 2022.3.6f1, 2022.3.24f1, 2023.2.18f1, 6000.0.b14
Not reproducible in: 2021.3.37f1, 2022.3.5f1
Reproduced on: Windows 11 Pro (23H2)
Not reproduced on: No other environment tested
Notes:
- This issue is very inconsistent to reproduce and might need several tries to reproduce successfully
- The user initially used other reproduction steps (which yielded inconsistent results), where they did not restart the project after adding two elements
- Alternatively, on the user-attached reproduction project the bug can be reproduced by adding at least two root elements and then two children elements to the last root element, and then after selecting the last child element clicking the space key