Page 1 of 2

[Oxyd] [16.1] Scenario not properly running on Linux

Posted: Wed Dec 13, 2017 10:12 pm
by Mylon
Observed behavior: Custom commands do not work. Game crashes on a second player joining.

To recreate:

Start a scenario in Windows.
Save game.
Transfer save to linux headless server.
Start server.
Connect to server (as client)
Custom commands (e.g. "/tag MyTag") no longer work. Game reports unknown command.
Second player joining causes server to crash.

Re: [16.1] Scenario not properly running on Linux

Posted: Wed Dec 13, 2017 10:17 pm
by Oxyd
Hi, I don't see a crash in the log you provided. Is it the correct log or am I missing something?

Re: [16.1] Scenario not properly running on Linux

Posted: Wed Dec 13, 2017 10:24 pm
by Klonan
Oxyd wrote:Hi, I don't see a crash in the log you provided. Is it the correct log or am I missing something?
There is a script error where global data that is present in the script.dat is nil, it seems that none of the Lua script is being initialised

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Wed Dec 13, 2017 10:25 pm
by I_IBlackI_I

Code: Select all

 691.067 Error MainLoop.cpp:1010: Exception at tick 40761: Error while running event level::on_player_created (ID 24)
/opt/factorio/factorio/data/core/lualib/silo-script.lua:181: attempt to index field 'silo_script' (a nil value)
 691.067 Error ServerMultiplayerManager.cpp:95: MultiplayerManager failed: "Error while running event level::on_player_created (ID 24)
/opt/factorio/factorio/data/core/lualib/silo-script.lua:181: attempt to index field 'silo_script' (a nil value)"
 691.067 Info ServerMultiplayerManager.cpp:693: mapTick(40761) changing state from(InGame) to(Failed)
 691.067 Info GlobalContext.cpp:649: Waiting for child processes to exit: 
 691.426 Info ServerMultiplayerManager.cpp:141: Quitting multiplayer connection.
 691.426 Info ServerMultiplayerManager.cpp:693: mapTick(4294967295) changing state from(Failed) to(Closed)
 691.426 Info HttpSharedState.cpp:54: Downloading https://multiplayer.factorio.com/remove-game/463566
 691.530 Info HttpSharedState.cpp:127: Status code: 200
 691.530 Info UDPSocket.cpp:206: Closing socket
 691.530 Info UDPSocket.cpp:236: Socket closed
 691.530 Info UDPSocket.cpp:206: Closing socket
 691.539 Info UDPSocket.cpp:206: Closing socket
 691.539 Info UDPSocket.cpp:236: Socket closed
 691.541 Goodbye
Does seem like there is an error and it started shutting down straight after.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Wed Dec 13, 2017 10:27 pm
by Mylon
Additionally, here is the save file I made using the scenario, before I uploaded it to the linux sever and started the server. As my player had already been created, I doubt it would allow any other player to join.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Wed Dec 13, 2017 10:34 pm
by Oxyd
I_IBlackI_I wrote:Does seem like there is an error and it started shutting down straight after.
As it should when it encounters an error. Just making sure I'm not missing anything here.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Wed Dec 13, 2017 10:36 pm
by I_IBlackI_I
Yeah I guess that doesn't count as a crash. When you are playing a game on a server and you suddenly lose connection / server stops responding most people assume it crashed instead of gracefully shut down because it encountered an error.
Apologies.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Thu Dec 14, 2017 1:35 pm
by Oxyd
I'm having no luck reproducing this. I've tried loading your scenario on the Windows version of 0.16.2, saving it and then hosting the save on a Linux server. When I connect, I get the rules dialog and I can use /tag just fine. Also, connecting a second player works just fine.

So is this still an issue in .2? Do I need to create the save in some specific way? What I've been doing is Play → Scenario → Create, and then Save Game and copy the save. Also the save you posted here works in the exact same way for me.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Thu Dec 14, 2017 2:03 pm
by Mylon
I just tested this in 16.2 and the problem still occurs. I'm going to try hosting on my own (via windows zip) and see what happens. I noticed Redmew's server (also known for being heavy on the scenario script) was running 100% vanilla so there may be a problem with their scenario as well.

The steps you described are what I'm doing. Not sure why we're getting different results.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Thu Dec 14, 2017 2:10 pm
by I_IBlackI_I
Would trying to get this error to occur while running heavy mode help you?

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Thu Dec 14, 2017 2:33 pm
by Mylon
I just tested this running a windows zip in headless mode and the scenario works properly.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Thu Dec 14, 2017 2:47 pm
by Oxyd
I_IBlackI_I wrote:Would trying to get this error to occur while running heavy mode help you?
No, heavy mode will not be relevant to this.
Mylon wrote:I just tested this running a windows zip in headless mode and the scenario works properly.
Did you use the Windows zipped version to create the file and then hosted it on Linux as usual, or did you host the game on Windows directly?

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Thu Dec 14, 2017 2:55 pm
by Mylon
Sorry, I should have clarified. I used my steam install to create the save file, then transferred it to a windows standalone (the zip download) to host as server using that. This produced a server with a working scenario.

I wonder perhaps if the problem could be a permissions error? Maybe the linux user does not have permissions to create the currently_playing directory and that's why the script isn't loading?

Edit: I checked and the temp/currently-playing directory is populated with my script files, but they don't seem to be loaded and running in the linux server.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Thu Dec 14, 2017 4:40 pm
by Oxyd
The game should complain about permission errors if it encounters any. But just to be sure, could you try running the server from a fresh install?

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Thu Dec 14, 2017 4:54 pm
by Mylon
I'm seeing massive desyncs on all servers running scenario scripts in 16.2, including the server running my scenario. I'd rather wait until that issue is resolved.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Sun Dec 17, 2017 7:01 pm
by Mylon
Update:

I can't seem to recreate this. Even on the same server using a different tool the scenario runs properly. This appears to be some form of configuration problem with the server.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Sun Dec 17, 2017 10:45 pm
by Mylon
Update: Admin says he removed the scenario folder and now it works.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Sat Jan 06, 2018 1:50 pm
by Mylon
The problem started happening again. Game log says it was applying a migration and saving and peeking at the save shows the freeplay control.lua instead of the scenario lua.

I was able to resolve the issue by emptying the save folder. I guess the game doesn't like having ~20 save files in the save folder?

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Sat Jan 06, 2018 6:59 pm
by Rseding91
Mylon wrote:The problem started happening again. Game log says it was applying a migration and saving and peeking at the save shows the freeplay control.lua instead of the scenario lua.

I was able to resolve the issue by emptying the save folder. I guess the game doesn't like having ~20 save files in the save folder?
That shouldn't be an issue. I have 239 saves in my save folder and it works just fine.

Re: [Oxyd] [16.1] Scenario not properly running on Linux

Posted: Mon Jan 08, 2018 5:15 pm
by Oxyd
Mylon wrote:The problem started happening again. Game log says it was applying a migration and saving and peeking at the save shows the freeplay control.lua instead of the scenario lua.
That's very curious. If it starts happening again, could you send the entire scenarios and saves folders? Looks like something in them confuses the game somehow. In fact, it would be helpful of you to just back up the broken installation before trying to repair it, so that we can then take a good look at the broken state.