0
Fixed

1.4 Recursion Limit

Rakka Rage 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 7

I got a state that calls a flow thrice.
That flow calls a flow which calls a flow.
= Recursion Error

- no recursion on my part?
- the limit is too low if it excludes a simple flow like this? worked pre 1.4
- should i increase limit? how?

StateA
 FlowA
  FlowB
   FlowC
 FlowA
  FlowB
   FlowC
 FlowA
  FlowB
   FlowC

please & thanks

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

the inner most flow needs 3 select for error too

+1
Pending Review

Thank you for reporting! Seems like a bug indeed, I'll look into it.

probably related 1.3.0 bug


this works, but as soon as i nest it, it throws recursion error

tried setting it as graph variable, did not helped


it could be something else thou, ill make a separate post

I had a quick look into this, and the general gist is that Bolt is trying to solve the Halting Problem, which is theoretically impossible. It detects recursion where there isn't any because it's afraid your graph might be in an infinite loop.

I'll try improving my naive workaround to the halting problem to be a bit stricter. In the mean time, you can set Recursion.defaultMaxDepth to a higher amount. The reason this issue appeared here in v.1.4 is because the recursion protection code is "twice" as strict, so even if you were below the threshold in v.1.3, you're now hitting it in v.1.4.

+1
Fixed in Alpha

Fixed in 1.4.0 Alpha 3.