PFreak Posted July 23, 2023 Share Posted July 23, 2023 Hello! My computer lost power the other day (while the dedicated server was running) and since then it crashes a little bit after startup every time. I tried a few things already, but I'm not sure what the problem is exactly, so I'm hoping somebody more knowledgeable here might have a solution for me, as I and my friends have been playing on this world for some time now. The server is being run from a Debian machine. Posting the part from the server log that I think is causing the crashes: [00:00:19]: OVERRIDE: setting autumn to noseason [00:00:19]: OVERRIDE: setting spring to noseason [00:00:19]: OVERRIDE: setting hounds to never [00:00:19]: OVERRIDE: setting winter to verylongseason [00:00:19]: OVERRIDE: setting resettime to none [00:00:19]: OVERRIDE: setting day to longdusk [00:00:19]: OVERRIDE: setting basicresource_regrowth to always [00:00:19]: OVERRIDE: setting summer to noseason [00:00:19]: OVERRIDE: setting portalresurection to always [00:00:19]: OVERRIDE: setting ghostsanitydrain to none [00:00:19]: OVERRIDE: setting weather to often [00:00:23]: Could not find anim [FROMNUM] in bank [eyeofterror] [00:00:27]: Reconstructing topology [00:00:27]: ...Sorting points [00:00:27]: ...Sorting edges [00:00:27]: ...Connecting nodes [00:00:27]: ...Validating connections [00:00:27]: ...Housekeeping [00:00:27]: ...Done! [00:00:27]: You must first AddTimer before you can start a timer bearger_timetospawn [00:00:27]: [string "scripts/components/worldsettingstimer.lua"]:21: attempt to perform arithmetic on field 'timeleft' (a nil value) LUA ERROR stack traceback: scripts/components/worldsettingstimer.lua:21 in (method) AddTimer (Lua) <7-24> self = timers = table: 0xe742df0 inst = 100029 - world (valid:true) saved_timers = table: 0xe742e40 name = bearger_timetospawn maxtime = 0 enabled = false callback = function - scripts/components/beargerspawner.lua:229 externallongupdate = nil saved = table: 0x90a1470 scripts/components/beargerspawner.lua:261 in (method) OnPostInit (Lua) <254-267> self = DoWarningSpeech = function - scripts/components/beargerspawner.lua:274 DoWarningSound = function - scripts/components/beargerspawner.lua:282 LongUpdate = function - scripts/components/beargerspawner.lua:333 SummonMonster = function - scripts/components/beargerspawner.lua:416 SetFirstBeargerChance = function - scripts/components/beargerspawner.lua:250 GetDebugString = function - scripts/components/beargerspawner.lua:400 LoadPostPass = function - scripts/components/beargerspawner.lua:379 OnPostInit = function - scripts/components/beargerspawner.lua:254 SetSecondBeargerChance = function - scripts/components/beargerspawner.lua:246 OnLoad = function - scripts/components/beargerspawner.lua:364 OnSave = function - scripts/components/beargerspawner.lua:341 OnUpdate = function - scripts/components/beargerspawner.lua:292 inst = 100029 - world (valid:true) totalbeargerchance = 1 scripts/prefabs/world.lua:315 in (method) PostInit (Lua) <306-326> inst = 100029 - world (valid:true) k = beargerspawner v = table: 0xd2afe90 scripts/gamelogic.lua:990 in (upvalue) DoInitGame (Lua) <855-1051> savedata = table: 0xf374220 profile = table: 0x6a1bff0 was_file_load = false options = table: 0x5c6e130 Levels = table: 0x736f980 scripts/gamelogic.lua:1085 in (local) cb (Lua) <1079-1086> savedata = table: 0xf374220 scripts/shardindex.lua:214 in (upvalue) OnLoadSaveDataFile (Lua) <196-215> file = session/8EBA0F2FB932BA8D/0000000091 cb = function - scripts/gamelogic.lua:1079 load_success = true str = local savedata = {} local tablefunctions = {} tablefunctions["map_fn"] = function() return {tiles="VlJTTgABAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA [**truncated**] success = true savedata = table: 0xf374220 scripts/shardindex.lua:219 in () ? (Lua) <218-220> load_success = true str = local savedata = {} local tablefunctions = {} tablefunctions["map_fn"] = function() return {tiles="VlJTTgABAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAE [00:00:27]: [string "scripts/components/worldsettingstimer.lua"]:21: attempt to perform arithmetic on field 'timeleft' (a nil value) LUA ERROR stack traceback: scripts/components/worldsettingstimer.lua:21 in (method) AddTimer (Lua) <7-24> scripts/components/beargerspawner.lua:261 in (method) OnPostInit (Lua) <254-267> scripts/prefabs/world.lua:315 in (method) PostInit (Lua) <306-326> scripts/gamelogic.lua:990 in (upvalue) DoInitGame (Lua) <855-1051> scripts/gamelogic.lua:1085 in (local) cb (Lua) <1079-1086> scripts/shardindex.lua:214 in (upvalue) OnLoadSaveDataFile (Lua) <196-215> scripts/shardindex.lua:219 in () ? (Lua) <218-220> =[C]:-1 in (method) GetPersistentString (C) <-1--1> scripts/shardindex.lua:218 in (method) GetSaveDataFile (Lua) <217-221> scripts/shardindex.lua:239 in (method) GetSaveData (Lua) <223-244> scripts/gamelogic.lua:1087 in (upvalue) DoLoadWorld (Lua) <1078-1088> scripts/gamelogic.lua:1140 in (upvalue) LoadSlot (Lua) <1134-1146> [00:00:27]: Check for write access: TRUE [00:00:27]: Check for read access: TRUE [00:00:27]: Available disk space for save files: 778370 MB [00:00:27]: ModIndex: Load sequence finished successfully. [00:00:28]: Reset() returning Thanks in advance for at least taking a look! Link to comment https://forums.kleientertainment.com/forums/topic/149770-crash-on-startup-after-power-outage/ Share on other sites More sharing options...
Daniel86268 Posted July 24, 2023 Share Posted July 24, 2023 Check if you have a mod that affects or at least accesses the spawn timers of Seasonal Bosses, specifically Bearger spawn timers. Link to comment https://forums.kleientertainment.com/forums/topic/149770-crash-on-startup-after-power-outage/#findComment-1653934 Share on other sites More sharing options...
PFreak Posted July 24, 2023 Author Share Posted July 24, 2023 7 hours ago, Daniel86268 said: Check if you have a mod that affects or at least accesses the spawn timers of Seasonal Bosses, specifically Bearger spawn timers. I tried disabling all mods in modoverrides.lua, still have the same thing. All the mods I'm using are in this pack, and yes, some of them do have settings that affect Bearger spawn timers, among other things. Link to comment https://forums.kleientertainment.com/forums/topic/149770-crash-on-startup-after-power-outage/#findComment-1654045 Share on other sites More sharing options...
PFreak Posted July 29, 2023 Author Share Posted July 29, 2023 If anyone finds themselves in a similar situation - I went to /home/*YOUR USERNAME*/.klei/DoNotStarveTogether/Cluster_1/Master/save/session and deleted the newest sessions (marked by incrementally increasing numbers, always incremented by 1) one by one, trying to start the server up each time. After a couple of them, the server started up normally, which I'm guessing means the newest saves got corrupted. Looks like I'll need to buy a UPS for my server computer to avoid something like this happening again. In the meantime, I'll probably be making backups after every gaming session I have with my friends. Link to comment https://forums.kleientertainment.com/forums/topic/149770-crash-on-startup-after-power-outage/#findComment-1655580 Share on other sites More sharing options...
PFreak Posted August 2, 2023 Author Share Posted August 2, 2023 Scratch that. The above allowed my friends and I to play for some time now. However, when I shutdown the server again with the command c_shutdown() (which, as far as I'm aware is the proper way to shut down a dedicated server), which I had to do beacuse there was an update, on the next startup the server started crashing again with bearger spawn timer messages. Getting really frustrating. Link to comment https://forums.kleientertainment.com/forums/topic/149770-crash-on-startup-after-power-outage/#findComment-1656541 Share on other sites More sharing options...
PFreak Posted August 2, 2023 Author Share Posted August 2, 2023 Another update - spent half a day trying to fix this. In the end what managed to get the server running is me opening the last session save and manually editing the bearger spawn timer value from "timeleft=inf" to "timeleft=0". Not sure why it would be set as that string or what meaning (if any) that string has. No idea what could have possibly caused this, but it was the reason for the crashes. Also, I immediately tested shutting down the server again with c_shutdown() and starting it up again to see if it would happen again. After that shutdown it crashes even faster, giving a similar, but slightly different error about a global value "nan" being nil. Does anyone have any ideas what could be causing this and how I could prevent it from happening? It is a very annoying issue, with my friends and I not being sure if we are going to be able to play again for some time every time there is an update to the game. Link to comment https://forums.kleientertainment.com/forums/topic/149770-crash-on-startup-after-power-outage/#findComment-1656786 Share on other sites More sharing options...
Daniel86268 Posted August 2, 2023 Share Posted August 2, 2023 No idea what's causing this on your server. My experience tells me to blame your mods. It is correct to shut down the server using c_shutdown(). However I've experienced a few times that the server doesn't do a save when shutting down like that, so the server reset to the last morning auto save. You can try doing a c_save() before the c_shutdown() and see if that at least does a good save that the next server start can use. Link to comment https://forums.kleientertainment.com/forums/topic/149770-crash-on-startup-after-power-outage/#findComment-1656789 Share on other sites More sharing options...
PFreak Posted August 12, 2023 Author Share Posted August 12, 2023 I'm now doing a c_save() and then a c_shutdown() every time the server needs to be turned off. I tested it once after fixing the initial error and shutting down the server immediately after turning it on, which caused another similar error. However, after fixing the initial error and running the server for some time, I can report two successful shutdowns and startups (had to do it for updates). So, with any luck the problem fixed itself now. If not, I at least have a general idea of how to fix any new problems (if they are similar to the previous ones). Link to comment https://forums.kleientertainment.com/forums/topic/149770-crash-on-startup-after-power-outage/#findComment-1658761 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.