[0.16.22] Desync on connect (multiple users experiencing)

Bugs that are actually features.
User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 556
Joined: Tue May 10, 2016 3:39 pm
Contact:

[0.16.22] Desync on connect (multiple users experiencing)

Post by Jon8RFC »

Multiple users have had problems connecting in the past two hours, to server 176.31.106.185:34199

I connected just fine 4-5 hours ago hours ago.

Desync is too large to attach to the forum:
https://drive.google.com/open?id=1x2oM9 ... jEsX6oXtu0_
Attachments
factorio-current - Copy.log
(1.52 MiB) Downloaded 82 times
Image
Rseding91
Factorio Staff
Factorio Staff
Posts: 16103
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.22] Desync on connect (multiple users experiencing)

Post by Rseding91 »

Thanks for the report. The desync is being caused by the custom scenario script you're running.

it's adding a GUI element to the player GUI on game load which is invalid and causes desyncs like you're experiencing. I recommend you just delete the scenario script - if you do it will fix the desyncs and everything will work normally.

Additionally the script is bypassing the "you can't change the game/global table in the on_load event" by setting local variables on script init and then running logic in on_tick based off those variables but as you're seeing that's still invalid and causes desyncs.

Mod makers and script makers need to learn: YOU ARE NOT ALLOWED TO CHANGE ANYTHING ON_LOAD, GAME STATE, LOCAL VARIABLES OR OTHERWISE. IT IS INVALID - STOP DOING IT!
If you want to get ahold of me I'm almost always on Discord.
User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 556
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: [0.16.22] Desync on connect (multiple users experiencing)

Post by Jon8RFC »

Ah-ha! Thanks for letting me know. I'll pass the word along.
Image
User avatar
Cooldude2606
Fast Inserter
Fast Inserter
Posts: 112
Joined: Sat Sep 16, 2017 9:04 pm
Contact:

Re: [0.16.22] Desync on connect (multiple users experiencing)

Post by Cooldude2606 »

Any scenario errors should have been passed to me first, sorry if this took up too much of your time.

I was the one who made the custom scenario, and on our server we try to encourage players to tell us about the desyncs first then pass them to you if it is game related.
But a point I would like to make is that I don't add guis on_load in fant the only thing I do (even thou I'm not ment to) is re-link the meta tables, so if there is a point I am missing where I add a gui on_load would you please tell me as that is never ment to happen.
I'm sorry for bypassing the "you can't change the game/global table in the on_load event" I can't find another way to get the same effect due to functions being cleared on_load/save.
context for my on_load
--- Developer for Explosive Gaming and Clusterio. Please contact me via our Discord. ---
Rseding91
Factorio Staff
Factorio Staff
Posts: 16103
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.22] Desync on connect (multiple users experiencing)

Post by Rseding91 »

Addons\Guis\player-list.lua line 45:

Code: Select all

Gui.left.add{...}
Then in on_tick you call Gui.left.update() which executes that function added by loading the script.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”