[0.15.19] Desync using game.write_file as an admin client

This subforum contains all the issues which we already resolved.
Post Reply
Chanz
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat May 14, 2016 11:17 am
Contact:

[0.15.19] Desync using game.write_file as an admin client

Post by Chanz »

What did you do?
I used the following code on my factorio client while I was connected to my factorio server. My client has admin permissions.
The client and server has no mods installed.

Code: Select all

/c count = 0  for k,v in pairs(game.players) do   if (v.connected) then       count = count + 1      end  end  game.write_file("./", "", false, count)
Formatted:

Code: Select all

/c 
count = 0
for k,v in pairs(game.players) do
	if (v.connected) then
	   count = count + 1
	end
end
game.write_file("./", "", false, count)
What happened?
Desync after pressing enter.

What did you expect to happen instead?
The game creates a file on the client/server or throws a error that files can't be written to client/server.

Write down the steps to reproduce the bug if you know them.
Execute the above code and the desync happens.

Does it happen always, once, or sometimes?
Happens always.

Download desync report
http://bcserv.eu/downloads/desync-report.zip
Last edited by Chanz on Sun Jun 11, 2017 10:39 pm, edited 1 time in total.

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

Re: [0.15.19] Desync using game.write_file as an admin client

Post by Rseding91 »

Please upload the desync report.
If you want to get ahold of me I'm almost always on Discord.

Chanz
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat May 14, 2016 11:17 am
Contact:

Re: [0.15.19] Desync using game.write_file as an admin client

Post by Chanz »

Rseding91 wrote:Please upload the desync report.
Sorry, I added the report now. Thanks for your work! :-)

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

Re: [0.15.19] Desync using game.write_file as an admin client

Post by Rseding91 »

The game creates a file on the client/server or throws a error that files can't be written to client/server.
This is exactly what's happening :) The file can't be written on the client because access is denied to the script-output directory on the client.

I'll change it for the next version of 0.15 so it silently records the error in the log file instead producing a game error so it won't cause desyncs if it fails on someones computer.
If you want to get ahold of me I'm almost always on Discord.

Chanz
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat May 14, 2016 11:17 am
Contact:

Re: [0.15.19] Desync using game.write_file as an admin client

Post by Chanz »

Thanks that sounds great.

Post Reply

Return to “Resolved Problems and Bugs”