[1.1.59] set 'out-of-map' tile on ungenerated chunk will cause desync

Bugs that are actually features.
Post Reply
kevinma
Inserter
Inserter
Posts: 33
Joined: Tue Jan 08, 2019 4:07 pm
Contact:

[1.1.59] set 'out-of-map' tile on ungenerated chunk will cause desync

Post by kevinma »

How to Reproduce:
1. start new game (freeplay)
2. toggle heavy mode
3. execute codes below in console
4. wait for desync

Code: Select all

script.on_nth_tick(60, function()
    game.surfaces[1].set_tiles({
        { name = 'out-of-map', position = { 32 * 100, 0 } }
    })
end)

script.on_nth_tick(300, function()
    game.surfaces[1].delete_chunk({32,0})
end)

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2318
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.59] set 'out-of-map' tile on ungenerated chunk will cause desync

Post by boskid »

I am not considering those steps to be a valid bug report. Usage of `script.on_nth_tick` from the console command is inherently a desync because those handlers will not be registered after save-load so you will get a heavy mode desyncs with anything inside of those handlers that change the game state.

kevinma
Inserter
Inserter
Posts: 33
Joined: Tue Jan 08, 2019 4:07 pm
Contact:

Re: [1.1.59] set 'out-of-map' tile on ungenerated chunk will cause desync

Post by kevinma »

I'm sorry for making wrong report. It did happen in my scenario, but i can't reproduce it in a simple way. Maybe it is a bug from my code or codes from other libraries.

Here's the step to reproduce desync in my scenario:
1. host the scenario in a dedicate server
https://github.com/kevinmama/PandaAI/tr ... c-set-tile
PandaAI-desync-set-tile.zip
(643.77 KiB) Downloaded 126 times
2. join the server, repeat clicking 'create team' and 'reset' button fast
截屏2022-06-09 上午2.39.45.png
截屏2022-06-09 上午2.39.45.png (313.35 KiB) Viewed 1467 times
This is the fixed branch:
https://github.com/kevinmama/PandaAI/tr ... t-tile-fix
PandaAI-desync-set-tile-fix.zip
(647.92 KiB) Downloaded 106 times
The only different is:
https://github.com/kevinmama/PandaAI/co ... t-tile-fix
截屏2022-06-09 上午2.44.19.png
截屏2022-06-09 上午2.44.19.png (142.13 KiB) Viewed 1467 times
function 'Area:iterate' will loop positions in the given area, if inside parameter is true, it won't pass the positions at right edge or bottom edge of the area.

The Desync Report:
desync-report-2022-06-09_02-42-27.zip
(5.42 MiB) Downloaded 123 times

Post Reply

Return to “Not a bug”