Hi everyone, I just encountered an annoying bug tonight...
In a prototype I'm developing, I'm trying to code a minmax algorithm for a tabletop game, and I want to generate a tree graph (a big one).
I implemented my GenerateTree method in gdscript, and as expected it took more than 30 seconds to generate, so I wanted to see how much time I could save by using C# (in the end I'll use coroutines so I expect it to be seconds long but it won't be freezing the game, maybe I'll add some feedback to make the player wait I haven't figured it out yet).
But when I launch my method, the app crashes before even printing anything (I have put prints at the beggining of my function)... And since there is this issue with VS2022 and the debugging extension I can't quite see why this is happening...
The variable maxLeaf is the maximal number of children a node can have, because in the final implementation, nodes won't all have the same number of children (but it will never be greater than maxLeaf). For my crash tests however, I want to generate all of them.
I attached to this post screens of my method (both in C# and in GDScript), the class of the Node and when the crash happens. It works perfectly fine in GDScript, but not in C#.