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

Fix LAN and multi-player crash on empty map or game mode #456

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

SadPencil
Copy link
Member

@SadPencil SadPencil commented Apr 2, 2023

Needs to be tested.

Fixes #377

Reproduce the bug:

  • Create a LAN game

  • Select "Favorite Maps" in game mode

  • Wait for a few second

  • As no maps are selected the broadcast triggers a null reference exception

  • Or one can modify a game option to trigger a null reference exception

@SadPencil
Copy link
Member Author

Workaround: when Map or GameMode is null, don't send broadcast message.
It is okay? @devo1929

@github-actions
Copy link

github-actions bot commented Apr 2, 2023

Nightly build for this pull request:

@SadPencil
Copy link
Member Author

After investigating this issue again, it seems this is another eight-year-old bug.

https://github.com/CnCNet/xna-cncnet-client/blame/74ca2f2657e0bd55f46f86a4d3a95f0d7b60665a/DXMainClient/DXGUI/Multiplayer/GameLobby/LANGameLobby.cs#L745

Hopefully this PR fixes it. Needs to be tested.

@SadPencil
Copy link
Member Author

SadPencil commented Sep 19, 2024

When Map or GameMode is null, the client now sends "Unknown" as their names instead of crashing

@SadPencil SadPencil changed the title Map and GameMode should not be null Fix LAN and multi-player crash on empty map or game mode Sep 19, 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.

Clicking Launch Game while viewing Favorites list with no maps listed crashes client
1 participant