Oarcinae / FactorioScenarioMultiplayerSpawn

A custom scenario for Factorio which provides each player a unique starting spawn point in a multiplayer game.
MIT License
49 stars 30 forks source link

Server error report #94

Closed timma7 closed 5 years ago

timma7 commented 5 years ago

Error report

I discovered this error while resetting the spawn location on a non-admin account, figured i would share it.

Oarcinae commented 5 years ago

Thank you for reporting! I'll look into it when I get time.

timma7 commented 5 years ago

Sounds good, I was scrambling to get the server back up again, but now i can give more details. I am running the server on factorio 17.34 headless with only your mod v 0.0.2. The server is only at 10% usage for cpu and 50% ram. I did not change any settings on your mod so that i would not need to have each player modify their mod to play. If there is something you need to to check or try let me know.

The player that crashed the server claims to have died and gone back to the center of the map. At that point they started playing with the spawn control instead of having me help them. Clicking the change spawn location button crashes the server every time.

Oarcinae commented 5 years ago

@timma7 Can you explain the exact steps to get this to happen? The spawn control button only shows up after the player has selected their spawn options right? Did they try to reset the player spawn after playing for awhile? or when they started? I'm looking through the code but can't figure out where it might fail.

Oarcinae commented 5 years ago

Or was the spawn control button already visible even when the player had just joined? Something is funky. I can see where it could fail, there's a cooldown value set in a table that doesn't get created until the player first selects their spawn option. But they should only get the spawn control button after spawning, so this is very odd.

timma7 commented 5 years ago

The player had been playing for 20ish hours in the same base before this happened. They were killed and for some reason spawned in the middle of the map. Because they were stuck in the middle of the map they clicked on the spawn control button hoping they could be sent back (apparently the button did not show any text). once clicked, the server showed this message and the server shut down. This is a non-recoverable error that cannot be ignored. No other player has seen this issue, despite all having died numerous times (big biters).

timma7 commented 5 years ago

I had the player reinstall the mod on their client, and the spawn control button now works, it seems the players name was not registered online, and was playing on another persons computer who already had that mod. Now they are spawning in the correct place, and the spawn control button is working.

Oarcinae commented 5 years ago

That's really odd... Are you using player verification or can players join and change their names and stuff? Also, the mod settings shouldn't need to match, but I don't have a good way to test that. Are you sure you have issues with the mod settings? They should all be server-side settings meaning that client's doesn't matter at all. Only the host matters.

timma7 commented 5 years ago

The server does not have player verification, just because in the past that has prevented us from connecting at times, only a password. When i changed the settings in this file C:\Users\youname\AppData\Roaming\Factorio\mods\oarc-mod_0.0.2.zip\oarc-mod_0.0.2 the players connecting have a mod mismatch error. Even when i have them delete the mod entirely and re-download the mod, they cannot connect due to a mod mismatch. If i knew the commands to put into the console i believe that would work, but modifying those files will not cooperate. I can test commands on the system if you have any suggestions....

timma7 commented 5 years ago

By the way, love this mod. Even when i cannot change the settings and the one player had problems, i would still implement this mod to every server i make from here on.

Honestly, the only settings i would change from default is to give players drones on startup (a settings i found and tested with partial success with a file download for each player) and the mod that reclaims unused map seems to not work correctly. Also love that it looks like it supports bobs mods, which will likely be my next server when we are done here.

Let me know if you need any more information or a person to test stuff with, ill be checking these posts...

Oarcinae commented 5 years ago

@timma7 Ah... yeah, with a mod you cannot modify the source files. I misunderstood what you meant at first. If you want to changes settings, you must change them in the game GUI. I exposed a lot of the settings there. Take a look in game at the mod settings to see what options you have to play with.

There's actually a lot of work I need to do to expose all the settings in the config.lua so that you can choose them in the mod settings in the game GUI.

You should be able to set the ores correctly for bobs/angels ores, but you might be limited by the number of starting resources allowed.

Let me know if you have looked at the in-game MOD settings and if you have questions about those. The scenario version exposes more settings that the mod.

timma7 commented 5 years ago

I did figure out how to use the console to apply mod changes, but my server crashed shortly after doing so, so i just left it as it was.... I will let you know when i play with it more...

Oarcinae commented 5 years ago

@timma7 Do you know what I mean by the mod settings? You shouldn't have to use any console or file editing.

image

Oarcinae commented 5 years ago

@timma7 I updated the mod a bit (v0.0.3) let me know if you run into any problems.

Cwhizard commented 5 years ago

We are getting a related, possibly the same issue. The server crashes on a non-recoverable error. The trigger is when a player clicks the spawn control gui button. It happens to some players and admins, but not all. I looked at the code on line 601 in the lua but it looks fine to me. I would diagnose it but I dont have root access to the server,

42688.939 Error MainLoop.cpp:1183: Exception at tick 14870699: The scenario level caused a non-recoverable error. Please report this error to the scenario author.

Error while running event level::on_gui_click (ID 1) ...ST-D/temp/currently-playing/lib/separate_spawns_guis.lua:601: attempt to index field '?' (a nil value) stack traceback: ...ST-D/temp/currently-playing/lib/separate_spawns_guis.lua:601: in function 'ExpandSpawnCtrlGui' ...ST-D/temp/currently-playing/lib/separate_spawns_guis.lua:682: in function 'SpawnCtrlGuiClick' ...mmon/factorioNAEAST-D/temp/currently-playing/control.lua:139: in function <...mmon/factorioNAEAST-D/temp/currently-playing/control.lua:128 42688.939 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The scenario level caused a non-recoverable error. Please report this error to the scenario author.

Error while running event level::on_gui_click (ID 1) ...ST-D/temp/currently-playing/lib/separate_spawns_guis.lua:601: attempt to index field '?' (a nil value) stack traceback: ...ST-D/temp/currently-playing/lib/separate_spawns_guis.lua:601: in function 'ExpandSpawnCtrlGui' ...ST-D/temp/currently-playing/lib/separate_spawns_guis.lua:682: in function 'SpawnCtrlGuiClick' ...mmon/factorioNAEAST-D/temp/currently-playing/control.lua:139: in function <...mmon/factorioNAEAST-D/temp/currently-playing/control.lua:128> 42688.939 Info ServerMultiplayerManager.cpp:776: updateTick(14870699) changing state from(InGame) to(Failed) 42688.939 Quitting: multiplayer error. 42689.481 Info ServerMultiplayerManager.cpp:138: Quitting multiplayer connection. 42689.481 Info ServerMultiplayerManager.cpp:776: updateTick(4294967295) changing state from(Failed) to(Closed) 42689.482 Info HttpSharedState.cpp:54: Downloading https://multiplayer.factorio.com/remove-game/5239339 42689.496 Info UDPSocket.cpp:210: Closing socket 42689.496 Info UDPSocket.cpp:240: Socket closed 42689.496 Info UDPSocket.cpp:210: Closing socket 42689.563 Info UDPSocket.cpp:210: Closing socket 42689.564 Info UDPSocket.cpp:240: Socket closed 42689.566 Goodbye

timma7 commented 5 years ago

@Oarcinae Wow, i have never seen that Mod settings screen. This server has always run headless because the machine has no graphics card and i am remote access only. I will try launching it in the game client and modifying those on my next server reboot. Command lines i can execute during the game, going into the gui means i need to kick everyone off for a while...

@Cwhizard I reccomend having your clients reinstall the mod on the client side, thats how i resolved it on my server. Also i had the game auto install the mod, not manually install on both server and client side.

timma7 commented 5 years ago

I updated my mod to v3 and i am immediately crashing on startup.... not sure what is going on but i cannot do anything right now with that installed... reverting to v2

the error i am getting when i host a test server on my pc is....

The mod Oarc Multiplayer Spawn caused a non-recoverable error. Please report this error to the mod author.

Error while running event oarc-mod::on_player_joined_game (ID 43) oarc-mod/lib/oarc_utils.lua:972: attempt to index field 'ocfg' (a nil value) stack traceback: oarc-mod/lib/oarc_utils.lua:972: in function 'PlayerJoinedMessages' oarc-mod/control.lua:163: in function <oarc-mod/control.lua:159>

Oarcinae commented 5 years ago

@timma7 post the error or any logs if you have them.

Are you starting a fresh map? I recommend only updating the mod/scenario if you are starting a new game.

Mod settings can be done on headless. Look for mod_settings.json. You can generate this on your local PC and then copy the settings to the headless server. I haven't done it in awhile so I can't remember the file locations but it shouldn't be hard to figure out.

I'll have to look into the spawn errors again, I'm traveling at the moment but will have some time in a few days most likely.

@Cwhizard was the crash with v0.0.2 of the mod? Thanks for the error report, that should help me track it down.

timma7 commented 5 years ago

Ill look into that... In the meantime i will use v2 which still works great in the current 17.41. Enjoy your vacation! Thank you for your support, and GREAT WORK! This mod should be built into the game.... By the way, is there a key button that i did not notice to bring up that gui you pictured earliear? I looked for it on the server while not in headless and i could not find it.

Oarcinae commented 5 years ago

To bring up the settings there are 2 places. One is from the main menu -> settings -> mod settings. The other is while you are creating the map, choosing the options, I think there is a tab on the bottom of that GUI to open mod settings right before you start the game.

Oarcinae commented 5 years ago

Apparently it's mod-settings.dat and you can't edit the file manually. You have to create it on your client PC and copy to the server. But I'm not sure about that, this is just what I was told from the discord server.

timma7 commented 5 years ago

OK ill look for that menu next time i restart.... thank you.

i have successfully modified that file before, but yes it did force me to copy it to each player manually... which did not work too well.... i will get into that menu and try it that way...

Oarcinae commented 5 years ago

@timma7 Closing this for now, re-open or open a new one if you have additional questions.