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

All actions of a sequence are initialized during sequence creation. #107

Closed
Flova opened this issue Apr 4, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Flova
Copy link
Member

Flova commented Apr 4, 2024

Summary

Currently all elements of a sequence are initialized during the intitialization of the sequence. This can lead to weird bugs when people expect the creation of the action element to happen when the action starts it's execution.

Expected behavior

The action should be initiated directly before it's execution, no other actions should be executed between the intitialization and execution.

Current behavior

They are initialized when the sequence starts it's execution. This leads to issues in when the action initialization is used synonymous with action start. This happens e.g. in the implementation of the stand action.

Steps to Reproduce

  • Create a sequence of actions that log the time since they where initialized and wait for a few seconds
  • Execute the sequence
  • Later actions show a long time since their initialization

Possible Solution

  1. Manually check for the first perform call with a flag and do the things that would normally happen during init there
  2. Or fix the code to lazy initialize only the currently active action before it's first performed

The first solution is easy as it requires no changes here, but people might have the same issue in the future as it is not intuitive. It also requires the rewrite of a bunch of actions
The second one changes a few things, but should not brake anything. I therefore prefere the second one.

@Flova Flova added the bug Something isn't working label Apr 4, 2024
@Flova Flova added this to Software Apr 4, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Software Apr 4, 2024
@Flova Flova moved this from 🆕 New to 🔖 Ready in Software Apr 4, 2024
@Flova Flova mentioned this issue Apr 5, 2024
@jaagut jaagut moved this from 🔖 Ready to 🏗 In progress in Software Apr 5, 2024
@jaagut
Copy link
Member

jaagut commented Apr 5, 2024

Closed with #108

@jaagut jaagut closed this as completed Apr 5, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Software Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants