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

Prevent crashes due to recursion stackoverflows #1272

Closed
wants to merge 1 commit into from

Conversation

Lizzie841
Copy link
Contributor

No description provided.

@schombert
Copy link
Owner

no effect can call itself directly. If this is caused by effects triggering events, and this is a real concern, I think it would be better (and more performant) to put those events into a delay buffer to be triggered in their own stack frame (i.e. like the events that get delayed by some days, but to fire in the same day)

@Lizzie841
Copy link
Contributor Author

no effect can call itself directly. If this is caused by effects triggering events, and this is a real concern, I think it would be better (and more performant) to put those events into a delay buffer to be triggered in their own stack frame (i.e. like the events that get delayed by some days, but to fire in the same day)

wouldnt that mess up order of execution?

@schombert
Copy link
Owner

it might, but thinking more about your solution here, I don't believe it would even solve the problem as-is, because the trip through the event -> ai logic to pick a choice would reset the stack depth counter in any case

@Lizzie841 Lizzie841 closed this Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants