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

Crashes/visual glitches when transitioning between game states #305

Closed
ethanmoffat opened this issue May 5, 2023 · 0 comments · Fixed by #313
Closed

Crashes/visual glitches when transitioning between game states #305

ethanmoffat opened this issue May 5, 2023 · 0 comments · Fixed by #313
Labels
Milestone

Comments

@ethanmoffat
Copy link
Owner

ethanmoffat commented May 5, 2023

There are some weird issues when adding many components to the monogame game components collection. Sometimes, character info panels will not be displayed or not all components will be added. Sometimes there are crashes ("failed to compare two elements in the array) from monogame.
image

I suspect this is due to the call to add components happening somewhat concurrently with the call to remove old components. Some of the new components get caught up in the removal.

The plan is to try and add some locking mechanism around the game's components collection when modifying it during game state transitions. In-game doesn't seem to have issues with adding new components, it's just when the huge batch of components changes between states in the pre-game menus and transitoning to in-game, so the change can probably be limited to the control set code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant