Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

construct() calls not delegated properly in certain situations #6

Open
dkambersky opened this issue Jul 14, 2017 · 2 comments
Open

Comments

@dkambersky
Copy link
Contributor

dkambersky commented Jul 14, 2017

Under certain conditions, DecoratorNodes can have their construct(Actor) called with the wrong Actor argument, causing issues if the Node is reading and/or writing to the Actor's dataMap, messing up both Actor's behaviors and throwing exceptions left and right.

So far I haven't been able to track down the cause and I don't know how widespread the issue is, but it's worth noting down.

Steps to reproduce:

  • Create two entities with this as their behavior tree
  • Watch the mayhem that ensues with the Timer

What fixes the above error is removing the outer loop, making the Sequence the top-level object (which also makes sense overall, as the loop is redundant). Hopefully if this decides to come up again, we'll have more info, and we'll be able to narrow down the cause.

@dkambersky
Copy link
Contributor Author

Still an issue. Looking into further.

@dkambersky
Copy link
Contributor Author

On the off chance someone else ends up looking into this later: The issue is likely in the construct() calls specifically being delegated wrong (so far I've only found that that happens in Actions nested under a Loop - might be another piece of the puzzle).

I.e. if you log the remaining time on each tick for a Sleep for 2 entities which you spawn at different times, the times are correct (and distinct) until one finishes, at which point the construct() for the Sleep action gets called, but for some reason it touches more than the original Actor it should.

@dkambersky dkambersky changed the title [v2] construct() calls not delegated properly construct() calls not delegated properly Jun 22, 2019
@dkambersky dkambersky changed the title construct() calls not delegated properly construct() calls not delegated properly in certain situations Jun 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant