You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some layer effects (ContinuousEffect) can send client side messages:
looked at all cards;
combat removes on transform;
day/night;
rules modifications, etc.
It can potentially break game and raise random errors like ConcurrentModificationException.
There are few potentially failure points:
informMessages call inside layer effects will send unfinished battlefield data to client side (in the middle of the apply effects logic);
Block game state and raise random ConcurrentModificationException due race conditional (if message sending thread get access to game data faster than ApplyEffects finished). The slower the game, the greater the chance for error.
I added runtime check and todos for such use cases in d757923, but it slow and must be enabled for debugging/testing only.
TODOs:
remove all informMessages inside layer effects or rework sending logic like simultaneousEvents does (collect all messages in single list and send after game cycle completed);
research and make sure message sending code get access to copied game only, not original;
make sure both fixes works fine and do not conflicts with each other (possible bug after fix: send really copied and unfinished data to a client side);
add server side commands line param to enable strict checks on informMessages with error logs and run it on production for research (how many errors in real games);
The text was updated successfully, but these errors were encountered:
Related to #11285
Some layer effects (
ContinuousEffect
) can send client side messages:It can potentially break game and raise random errors like
ConcurrentModificationException
.There are few potentially failure points:
informMessages
call inside layer effects will send unfinished battlefield data to client side (in the middle of the apply effects logic);ConcurrentModificationException
due race conditional (if message sending thread get access to game data faster than ApplyEffects finished). The slower the game, the greater the chance for error.I added runtime check and todos for such use cases in d757923, but it slow and must be enabled for debugging/testing only.
TODOs:
simultaneousEvents
does (collect all messages in single list and send after game cycle completed);The text was updated successfully, but these errors were encountered: