Page 1 of 1

[Oxyd] [15.17] Client & Headless Client Crash

Posted: Wed May 31, 2017 10:24 pm
by AlienX
Hi Devs,
Every client connected to the headless client, including the headless client crashed at exactly the same time.
Unsure what the cause was - and also unsure if the log will help, but i thought i would post the files anyways.

At the time of the crash, we were picking up belts which had items on with our personal robo ports.

Re: [15.16] Client & Headless Client Crash

Posted: Wed May 31, 2017 11:38 pm
by TruePikachu
Pathfinder bug of some sort, everyone in the game (including the server) crashed because everyone needed to run the pathfinder for determinism.

Code: Select all

  31.124 Info GameActionHandler.cpp:3236: MapTick (43254421) processed PlayerJoinGame peerID(1) playerIndex(7) mode(connect ) 
  31.251 Info ServerMultiplayerManager.cpp:754: mapTick(43254426) received stateChanged peerID(2) oldState(ConnectedWaitingForMap) newState(ConnectedDownloadingMap)
  39.208 Info ServerMultiplayerManager.cpp:754: mapTick(43254724) received stateChanged peerID(2) oldState(ConnectedDownloadingMap) newState(ConnectedLoadingMap)
  43.530 Info ServerMultiplayerManager.cpp:754: mapTick(43254894) received stateChanged peerID(2) oldState(ConnectedLoadingMap) newState(TryingToCatchUp)
  69.140 Info ServerMultiplayerManager.cpp:754: mapTick(43255902) received stateChanged peerID(2) oldState(TryingToCatchUp) newState(WaitingForCommandToStartSendingTickClosures)
  69.141 Info GameActionHandler.cpp:3236: MapTick (43255902) processed PlayerJoinGame peerID(2) playerIndex(0) mode(connect ) 
  69.247 Info ServerMultiplayerManager.cpp:754: mapTick(43255906) received stateChanged peerID(2) oldState(WaitingForCommandToStartSendingTickClosures) newState(InGame)
2017-05-31 23:12:27 [JOIN] AlienX joined the game
2017-05-31 23:13:33 [COMMAND] AlienX (command): local count = 0  local dcount = 0  for _,entity in pairs(game.player.surface.find_entities_filtered{type="unit", force="enemy"}) do   count = count + 1   if not entity.active then    dcount = dcount + 1   end  end  game.print("There are "..count.." alien units on the map currently, of which "..dcount.." are in an active state")
2017-05-31 23:14:12 [COMMAND] AlienX (command): local count = 0  local dcount = 0  for _,entity in pairs(game.player.surface.find_entities_filtered{type="unit", force="enemy"}) do   count = count + 1   if not entity.active then    dcount = dcount + 1   end  end  game.print("There are "..count.." alien units on the map currently, of which "..dcount.." are in an active state")
2017-05-31 23:14:28 [COMMAND] AlienX (command): local count = 0  local dcount = 0  for _,entity in pairs(game.player.surface.find_entities_filtered{type="unit", force="enemy"}) do   count = count + 1   if entity.active then    dcount = dcount + 1   end  end  game.print("There are "..count.." alien units on the map currently, of which "..dcount.." are in an active state")
2017-05-31 23:14:49 [COMMAND] AlienX (command): local count = 0  local dcount = 0  for _,entity in pairs(game.player.surface.find_entities_filtered{type="unit", force="enemy"}) do   count = count + 1   if entity.active then    dcount = dcount + 1    entity.active = false   end  end  game.print("There are "..count.." alien units on the map currently, of which "..dcount.." are in an active state")
2017-05-31 23:15:28 [COMMAND] AlienX (command): local count = 0  for _,entity in pairs(game.player.surface.find_entities) do   if entity.name == "fish" then    entity.destroy()    count = count + 1   end  end  game.print("Removed "..count.." little fishy bastards")
2017-05-31 23:15:28 Cannot execute command. Error: [string "local count = 0  for _,entity in pairs(game.p..."]:1: bad argument #1 to 'pairs' (table expected, got function)
2017-05-31 23:15:43 [COMMAND] AlienX (command): local count = 0  for _,entity in pairs(game.player.surface.find_entities()) do   if entity.name == "fish" then    entity.destroy()    count = count + 1   end  end  game.print("Removed "..count.." little fishy bastards")
2017-05-31 23:16:18 [COMMAND] AlienX (command): game.server_save()
 300.299 Info AppManager.cpp:252: Saving game as /var/www/factorio/agnfactory/saves/_autosave2.zip
2017-05-31 23:16:45 [COMMAND] AlienX (command): for _,entity in pairs(game.player.surface.find_entities_filtered{force = "player"}) do   if entity.name == "accumulator" or entity.name == "solar-panel" or entity.name == "substation" then    if entity.to_be_deconstructed(game.player.force) then     entity.destroy()    end   end  end
2017-05-31 23:18:57 [COMMAND] AlienX (command): local count = 0  local dcount = 0  for _,entity in pairs(game.player.surface.find_entities_filtered{type="unit", force="enemy"}) do   count = count + 1   if entity.active then    entity.active = true   end  end  game.print("There are "..count.." alien units now active")
 544.289 Error CrashHandler.cpp:232: Received SIGSEGV
 546.086 Warning Logger.cpp:396: Symbols.size() == 20, usedSize == 12
Factorio crashed. Generating symbolized stacktrace, please wait ...
 547.100 Warning Logger.cpp:396: Symbols.size() == 19, usedSize == 11
#0  0x0000000000735ac0 in CrashHandler::writeStackTrace() at /tmp/factorio-FqXFm6/src/Util/CrashHandler.cpp:105
#1  0x0000000000735d44 in CrashHandler::SignalHandler(int) at /tmp/factorio-FqXFm6/src/Util/CrashHandler.cpp:237
#2  0x00007fd7cb9334b0 in ?? at ??:0
#3  0x0000000000c0593b in findJumps at /tmp/factorio-FqXFm6/src/AI/PathFinder.cpp:562
#4  0x0000000000dee42a in searchForPath at /tmp/factorio-FqXFm6/src/AI/PathFinder.cpp:435
#5  0x0000000000df2b51 in update at /tmp/factorio-FqXFm6/src/AI/PathFinder.cpp:697
#6  0x0000000000e0cc68 in update at /tmp/factorio-FqXFm6/src/Surface/Surface.cpp:948
#7  0x0000000000e0d9c1 in update at /tmp/factorio-FqXFm6/src/Map/Map.cpp:1224
#8  0x0000000000ecb788 in update at /tmp/factorio-FqXFm6/src/Game.cpp:157
#9  0x00007fd7cb91e830 in update at /tmp/factorio-FqXFm6/src/Scenario/Scenario.cpp:790
#10 0x0000000000406de9 in updateStep at /tmp/factorio-FqXFm6/src/Scenario/Scenario.cpp:721
 547.100 Error CrashHandler.cpp:106: Map tick at moment of crash: 43273675
 547.100 Error Util.cpp:80: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
EDIT: Can you provide the most recent autosave from before crashing, especially if it is reproducible?

Re: [15.16] Client & Headless Client Crash

Posted: Wed May 31, 2017 11:47 pm
by AlienX
I've since gone to bed now, however another guy who plays on the same server has said it's crashed again since restart.

I'll upload a save in the morning :)

Re: [15.16] Client & Headless Client Crash

Posted: Thu Jun 01, 2017 12:18 am
by shadow128k
i got ya bud.


Server crashes within 5 mins regardless if single player or running via server

Re: [15.17] Client & Headless Client Crash

Posted: Thu Jun 01, 2017 1:57 pm
by AlienX
Tested on 15.17 - still crashes.

Re: [15.17] [Oxyd] Client & Headless Client Crash

Posted: Thu Jun 01, 2017 11:32 pm
by AlienX
I have a feeling that setting a LUAEntity type of "Unit" to entity.active = false causes this crash, code example below:

Code: Select all

for _, e in pairs(game.player.surface.find_entities_filtered{force = "enemy"}) do
	if e.type == "unit" then
		e.active = false
	end
end

Re: [Oxyd] [15.17] Client & Headless Client Crash

Posted: Fri Jun 02, 2017 3:14 pm
by Oxyd
Thanks, should be fixed in 0.15.19.