-
-
Notifications
You must be signed in to change notification settings - Fork 112
Fix loading screen hanging on map parsing errors #782
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures the loading screen no longer hangs if map parsing errors occur by moving the error-display setup into the main menu initialization, and it enriches existing debug assertions with descriptive messages.
- Changed how and when
DisplayErrorActionis assigned to prevent hangs on startup. - Updated
Debug.Assertcalls to include explanatory messages in two channel‐related files. - Tweaked exception logging null safety and made
HandleExceptionpublicly accessible.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| DXMainClient/PreStartup.cs | Added null-conditional on TargetSite.Name, made HandleException public, used named parameter for clarity. |
| DXMainClient/Online/Channel.cs | Updated comment and added message string to Debug.Assert for users collection. |
| DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLobby.cs | Added message string to Debug.Assert in RefreshPlayerList. |
| DXMainClient/DXGUI/Generic/MainMenu.cs | Moved DisplayErrorAction assignment into PostInit to defer error dialogs. |
| DXMainClient/DXGUI/GameClass.cs | Removed previous DisplayErrorAction assignment from Initialize. |
Comments suppressed due to low confidence (2)
DXMainClient/PreStartup.cs:244
- Changing
HandleExceptionfromstatic(package‐private) topublic staticalters the class's API surface. Confirm this exposure is intentional and update any documentation or consumers accordingly.
public static void HandleException(object sender, Exception ex)
DXMainClient/DXGUI/Generic/MainMenu.cs:656
- This new error‐display behavior should be covered by unit or integration tests to verify that errors during map parsing invoke this
DisplayErrorActionand that the application handlesexitcorrectly.
MainClientConstants.DisplayErrorAction = (title, error, exit) =>
|
Nightly build for this pull request:
|
This PR contains partial fix from #718
Debug.Assert