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

[BUG] Client never starts game when client ids are not within 1 to 10 #1197

Closed
mFragaBA opened this issue Nov 24, 2023 · 0 comments · Fixed by #1198
Closed

[BUG] Client never starts game when client ids are not within 1 to 10 #1197

mFragaBA opened this issue Nov 24, 2023 · 0 comments · Fixed by #1198
Assignees
Labels
bug Something isn't working

Comments

@mFragaBA
Copy link
Contributor

🐛 Bug Report

The game doesn't start for the client if we run load tests and a client at the same time. This is because there's one function where we're assuming that client IDs go from 1 to 10 and this might not necessarily true (in fact in other places we don't).

(Write your description here)

Steps to Reproduce

  1. start the backend application
  2. start the load test application
  3. run the game on unity and start a new game
  4. before the game starts, start a load test run with LoadTest.PlayerSupervisor.spawn_players(50, 100)

Stack trace & error message

NullReferenceException: Object reference not set to an instance of an object
CustomLevelManager+<>c__DisplayClass35_0.<GetCharacterPrefab>b__0 (CoMCharacter el) (at Assets/Scripts/CustomLevelManager.cs:162)
System.Collections.Generic.List`1[T].Find (System.Predicate`1[T] match) (at <492e64214f0c42f2b51bf2d39219ebe6>:0)
CustomLevelManager.GetCharacterPrefab (System.UInt64 playerId) (at Assets/Scripts/CustomLevelManager.cs:162)

Screenshot

Expected Behavior

The game should start regardless of the player ids

Your Environment

Tested on branch main.
Tested on MacOS 13.5.1
Tested on Unity 2021.3.26.3f

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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant