Fix district-related building desyncs and crashes#128
Fix district-related building desyncs and crashes#128SamuZad wants to merge 2 commits intothomaswp:devfrom
Conversation
4693d06 to
100e676
Compare
100e676 to
4dc6837
Compare
|
The district center desync I reported, in issue #125, is from the client side. Sounds like that one's going to be harder to reproduce. It is probably a separate issue from this though. |
|
It looks like #96 is also a district center-placing desync that would be fixed by this. |
4dc6837 to
796fc69
Compare
796fc69 to
dd49b03
Compare
|
@thomaswp I changed things to be more tailor-made to the problem at hand
I have verified that these stop all district-related desyncs/crashes, and cause no immediate population-related desyncs. (The caveat is that I only tested population stuff for about 20 minutes, so there might be more subtle things with large populations and extended game sessions - I will try to do some more thorough testing) In the meanwhile, could you let me know what you think about the approach? |
|
I have now played with this change for an extended time placing multiple district centers and crossings, and found no issues. So I'm confident enough to no longer call this a work in progress |
|
Hey @SamuZad I like the new approach. The title of this PR could use an update to reflect it! |
|
error-report-2026-03-25-20h10m27s.zip |
|
Thanks for this! Ok, so am I understanding correctly that:
Is that issue that a valid placement still causes errors, so you have to suppress them? Is that because of the second bullet above? Or is the issue just that to catch invalid placements in a way that doesn't break things, you need these finalizers? I guess my concern is that this logic seems very likely to break if the devs change anything about district centers (even string literals). If possible I'd love a more robust fix, but if it's not then it's good to have a fix, even if we have to update it. |
Yes, this is true both for district centers and crossings - even valid placements (and deconstructions) were causing issues. The current solution handles both valid and invalid placements reasonably well, but I do agree that it is very "tailor-made". However, I couldn't think of any better way to handle it, so I think it would make sense to merge this |
Fixes #81 and #125
Placing district centers and district center crossings are more sensitive than other buildings. Their placement by the host would "reliably" cause desyncs (with the district center) and crashes (with district center crossings).
The problem was that the act of placing by the host would render that location "invalid" when it was replayed back at the host
The clients had no such issues, they could place these objects just fine.