Closed oversword closed 2 years ago
disallow this kind of placement, possibly with an error message
Some loops are actually allowed and make sense (as long as there is an exit condition)
detect this kind of loop at runtime and refuse to execute it
I'm leaning more towards that solution, maybe with a simple cpu-usage tracker that does some kind of overheat/cancel actions like the mesecons mod does :thinking:
Yeah that could do it, ATM it's just hitting the recursion limit & crashing, maybe you could just have a counter that stops it before it hits the limit and changes their state to "overheated" or something
That was surprisingly easy: i just added a counter to the recursed function:
2021-10-29 08:09:10: [Server]: [epic][executor] max recursion depth exceeded at: (-137,9,1)
If you place the blocks with the green sides facing each other you can easily enter an infinite loop accidentally, cuasing the server to crash.
With my setup I placed a start block and an unstash block next to each other, on executing the start block the game enters an infinite loop and crashes.
The mod should either