[0.15.12] Desync LuaPlayer.cursor_position

This subforum contains all the issues which we already resolved.
Post Reply
befzz
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Jul 18, 2016 5:08 pm
Contact:

[0.15.12] Desync LuaPlayer.cursor_position

Post by befzz » Fri May 19, 2017 6:39 pm

Steps:
1. Invoke: game.players[1].cursor_position = {0,0}
2. Insta-desync.

Code: Select all

2017-05-19 21:33:25 [COMMAND] befzz 1 (command): game.players[1].cursor_position = {1,1}
2017-05-19 21:33:25Cannot execute command. Error: Player doesn't have a game view.
stack traceback:
        [string "game.players[1].cursor_position = {1,1}"]:1: in main chunk
 509.645 Info ServerMultiplayerManager.cpp:754: mapTick(28312) received stateChanged peerID(1) oldState(InGame) newState(DesyncedWaitingForMap)
 509.646 Info ServerMultiplayerManager.cpp:825: mapTick(28312) received playerDesynced peer (1)
 509.647 Info ServerMultiplayerManager.cpp:670: mapTick(28312) changing state from(InGame) to(InGameSavingMapForDesyncReport)
 510.722 Info ServerMultiplayerManager.cpp:808: MapTick(28312) Serving map(C) for peer(1) size(6301618) crc(1101389527)
 510.722 Info ServerMultiplayerManager.cpp:670: mapTick(28312) changing state from(InGameSavingMapForDesyncReport) to(InGame)
 510.788 Info ServerMultiplayerManager.cpp:754: mapTick(28312) received stateChanged peerID(1) oldState(DesyncedWaitingForMap) newState(DesyncedCatchingUpWithMapReadyForDownload)
 510.788 Info ServerMultiplayerManager.cpp:754: mapTick(28312) received stateChanged peerID(1) oldState(DesyncedCatchingUpWithMapReadyForDownload) newState(DesyncedSavingLocalVariantOfMap)
 511.880 Info ServerMultiplayerManager.cpp:754: mapTick(28312) received stateChanged peerID(1) oldState(DesyncedSavingLocalVariantOfMap) newState(DesyncedDownloadingMap)
 512.111 Info ServerMultiplayerManager.cpp:754: mapTick(28312) received stateChanged peerID(1) oldState(DesyncedDownloadingMap) newState(DesyncedCreatingReport)
 512.625 Info ServerMultiplayerManager.cpp:854: Disconnect notification for peer (1)
 512.626 Info ServerMultiplayerManager.cpp:754: mapTick(28342) received stateChanged peerID(1) oldState(DesyncedCreatingReport) newState(DisconnectScheduled)
2017-05-19 21:33:28 [LEAVE] befzz left the game
 512.626 Info ServerSynchronizer.cpp:557: nextHeartbeatSequenceNumber(15224) removing peer(1).
 512.720 Info UnparsedNetworkMessage.cpp:87: Invalid packet (type ClientToServerHeartbeat) received from 192.168.0.82:53617: heartbeat outside latency window
 512.729 Info UnparsedNetworkMessage.cpp:98: Message data: 26 10 70 3f 0c 0a b6 6e 00 00 02 03 09 03 0a
 512.729 Info UnparsedNetworkMessage.cpp:87: Invalid packet (type ClientToServerHeartbeat) received from 192.168.0.82:53617: heartbeat outside latency window
 512.729 Info UnparsedNetworkMessage.cpp:98: Message data: 26 00 71 3f 0c 0a b6 6e 00 00
 512.729 Info UnparsedNetworkMessage.cpp:87: Invalid packet (type ClientToServerHeartbeat) received from 192.168.0.82:53617: heartbeat outside latency window
 512.729 Info UnparsedNetworkMessage.cpp:98: Message data: 06 00 72 3f 0c 0a b6 6e 00 00
 512.762 Info UnparsedNetworkMessage.cpp:87: Invalid packet (type ClientToServerHeartbeat) received from 192.168.0.82:53617: heartbeat outside latency window
 512.762 Info UnparsedNetworkMessage.cpp:98: Message data: 06 00 73 3f 0c 0a b6 6e 00 00
 512.795 Info UnparsedNetworkMessage.cpp:87: Invalid packet (type ClientToServerHeartbeat) received from 192.168.0.82:53617: heartbeat outside latency window
 512.795 Info UnparsedNetworkMessage.cpp:98: Message data: 06 00 74 3f 0c 0a b6 6e 00 00
 512.845 Info UnparsedNetworkMessage.cpp:87: Invalid packet (type ClientToServerHeartbeat) received from 192.168.0.82:53617: heartbeat outside latency window
 512.845 Info UnparsedNetworkMessage.cpp:98: Message data: 26 00 75 3f 0c 0a b6 6e 00 00
Invalid packet spam caused by 3rd(?) desync while frame with two buttons visible ("[Reconnect] [Quit game]")

P.S. Win10/Steam/Intel4670 / Dedicated server & client on the same PC.

Rseding91
Factorio Staff
Factorio Staff
Posts: 9437
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.12] Desync LuaPlayer.cursor_position

Post by Rseding91 » Fri May 19, 2017 7:40 pm

Thanks for the report. I've removed cursor_position since it's not useful in any way as it is and as you've experienced doesn't actually work in MP.
If you want to get ahold of me I'm almost always on Discord.

credomane
Filter Inserter
Filter Inserter
Posts: 253
Joined: Tue Apr 12, 2016 6:21 pm
Contact:

Re: [0.15.12] Desync LuaPlayer.cursor_position

Post by credomane » Mon May 22, 2017 2:33 pm

Rseding91 wrote:Thanks for the report. I've removed cursor_position since it's not useful in any way as it is and as you've experienced doesn't actually work in MP.
I didn't know that existed. Reading cursor position would be fantastic for a pseudo-RNG. Though it would be super hard to keep it up-to-date across all player in mp to prevent desync. :P
Continue using game.tick for pseudo-RNG it is!

Rseding91
Factorio Staff
Factorio Staff
Posts: 9437
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.12] Desync LuaPlayer.cursor_position

Post by Rseding91 » Mon May 22, 2017 8:02 pm

credomane wrote:
Rseding91 wrote:Thanks for the report. I've removed cursor_position since it's not useful in any way as it is and as you've experienced doesn't actually work in MP.
I didn't know that existed. Reading cursor position would be fantastic for a pseudo-RNG. Though it would be super hard to keep it up-to-date across all player in mp to prevent desync. :P
Continue using game.tick for pseudo-RNG it is!
Why not just use .. the built in RNG math.random() that the rest of the game uses? :P
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: Bing [Bot]