Not a Bug

StackOverflow error on multiple units...

micro_machines 3 years ago updated 3 years ago 4

Unity 2018.3.14f1

Bolt 1.4.4

Hello, I recently started using Bolt and I'm doing good progress. Their tutorials are so good. Today I'm hitting a wall tho. I'm trying to make a sort of floating "UFO" that will wander around. If it wanders off too far it will try to return to an initial reference point.

GooBalloon (parent with the bolt state machine) has 2 children (Balloon and RefPoint):

This is the general view of the state machine:

But I'm getting this error when I play:

Ludiq.EditorTimeUtility.get_frame () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Utilities/EditorTimeUtility.cs:11)

...In a modul that seems innocuous. If I try to bypass this part of the flow, I will get another "random" error in another part of the flow:

I also got the StackOverflowError on that GetOnUnitSphere unit when I tried to bypass the first StackOverflowError.

FYI, the variable Balloon is:

Thank you for your time, I'm kinda lost after this!

Bolt Version:
Bolt 1.4.4
Unity Version:
Unity 2018.3.14f1
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi Micro_machines,

I can't see why that would be happening from the screenshots. Can you send a small test project to support@ludiq.io? Thanks.

Thanks Lazlo, I sent you the project via Google Drive.

Not a Bug

Hi Micro_Machines, sorry for the late reply on this.

Thank you for sending the project over. The issue is that there is an infinite loop between your Idle and Move Balloon states. Both transitions between them happen in On Enter State, so they are instantly trying to go from one to another. Bolt stops it with a StackOverflowException to prevent Unity from freezing.

I'm not sure what you're trying to accomplish exactly, but you could add something like a Wait in the Return transition to make sure it waits a little bit before going back to Idle. For example:

Tried this exactly and it seemed to fix it!

Oh, that makes sense. Thanks Lazlo