-
-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Labels
1.5Fixes or bugs relating to 1.5 (Not Anomaly).Fixes or bugs relating to 1.5 (Not Anomaly).bugSomething isn't working.Something isn't working.multifactionBugs or issues only in multifaction mode.Bugs or issues only in multifaction mode.
Description
Occurred in: BETA 0.10.6 for RW 1.5.4409
Label: dev-branch, 1.5, multifaction
Bug:
When a client starts a new faction with the mechanitor scenario, an error occurs during map generation, followed by a desync once the game is unpaused.
Steps to Reproduce
Mods: Prepatcher, Harmony, Biotech, Ideology, Royalty, Multiplayer
- Host a multiplayer game.
- Join with another instance as client.
- As the client, start a new faction using the mechanitor scenario.
- During map generation, observe the following error: Error in GenStep: System.NullReferenceException: Object reference not set to an instance of an object
- Unpause the game - a desync occurs.
Technical Details / Cause
- The issue occurs because TickManager.Pause is called, and the Multiplayer Harmony Postfix patch references Game.currentMap, which is null at this point in map generation.
- A guard for currentMap == null was added in Improved starting experience for multifaction #508 but later reverted (adc9d8b#diff-e2d1935affa8fc6df58e22fb262dd657d4774930103d508fd4b70e1f446868b9L150) due to uncertainty about its purpose - both in code review (noted by @SokyranTheDragon) and because I had forgotten the reason myself after writing it 6 months earlier. The fix should be more explicit and self-explanatory, rather than relying on a simple guard clause without clear context.
ErrorLog:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
1.5Fixes or bugs relating to 1.5 (Not Anomaly).Fixes or bugs relating to 1.5 (Not Anomaly).bugSomething isn't working.Something isn't working.multifactionBugs or issues only in multifaction mode.Bugs or issues only in multifaction mode.