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.
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.
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.
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.