0
Fixed

Recursion.defaultMaxDepth

Charles-Étienne Brochu 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 10

Hi,

I think I noticed that if I copy a Superunit that set a different value for the same Flow variable more than 10 times, I get a Recursion.defaultMaxDepth error. Is there a way to increase the max recursion depth?

I know my superunit is working because it only breaks at the tenth instance of the superunit, no matter how I plug everything.

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
GOOD, I'M SATISFIED
Satisfaction mark by Charles-Étienne Brochu 2 years ago

Actually, what seems to be breaking the superunit is just being copied more than 10 times in the same flow, not the flow variable thing.

Pending Review

Hi Charles-Étienne!

Can you show me a simple graph that reproduces this issue?

Also, on which version of Bolt are you on? Recursion branching issues were fixed in 1.4 IIRC.

Hi Lazlo, thank you for your answer. By the way, Bolt is amazing in all aspect.

I have version 1.4.0f3.

So I have this specific flow. As you can see in the first picture, to make it work, I did one super unit macro (Etage2) for the 10 first copy and an other macro (Etage) (the same superunit but a different macro file) for the next 10 copy. And it works just fine. But as soon as I pass 10 copy of the same superunit, it breaks as illustrated in picture 2.



This is the superunit. But I encountered the same limit with different superunit.


Hi Charles-Étienne, thanks for providing the repro steps.

I'll try to recreate the issue tomorrow (Tuesday is my bugfix day!) and fix what's causing it.

Hi,

similar issue here, I have a machine that works without error until the variables that sets the number of repetitions is 9 or lower.

If I go up to ten or more, recursion error.

Problem is I need to go up to 16 max as that is what activates my spawn points and set difficulty.

Fixed in Next Version

I fixed both issues reported for v.1.4.0f6.

Charles-Étienne: The flow recursion detection will now properly differentiate when multiple nester elements share the same macro and not count it as the same re-entry.

Alessandro: The default max depth for runtime will be increased to 100. You can still increase it manually if you need, but this should cover more cases. Editor max recursion depth for analysis and prediction has been decreased to 1 to improve editor FPS with recursive graphs.

Wow thank you vers much. I'll try it very soon.