Blecki / dwarfcorp

An open-source 3D colony management game for PC, Mac and Linux
http://www.dwarfcorp.com
Other
580 stars 71 forks source link

Saving a game manually disables autosave #981

Open PaxJaromeMalues opened 5 years ago

PaxJaromeMalues commented 5 years ago

Hi, I just saw that playing the game and then saving manually once will end up in the game not being able to recover old autosaves, even tho the file autosave process still continued ingame for ~45mins every 5 minutes. THis is relevant because crashes will then leaver you with about hours old manual saves instead of the recent latest autosave.

mklingen commented 5 years ago

I can't seem to reproduce this. Saving manually does not seem to disable autosave. Can you maybe clarify what you mean by "recover old autosaves"? Are you saying that your auto saves are not loading properly, or that they aren't appearing? FYI, dwarfcorp keeps around 1 autosave, and as many manual saves as you want.

PaxJaromeMalues commented 5 years ago

This occured to me while playing a normal session (still with the bed-bug).

  1. Play normally with 5min autosave.
  2. Random Crash.
  3. Reload savegame from autosave.
  4. Repeat step 2 and 3 for n times.
  5. Decide to make a manual save.
  6. Random Crash.
  7. Restart game.
  8. Empty load area, no manual save present, no autosave files present. MFW (⊙ ‿ ⊙) ? plS wAt?

Might just be a random fuckup of my computer. Haven't had time to play since.

PaxJaromeMalues commented 5 years ago

Oh wait, just remembered, false order:

  1. Play normally with 5min autosave.
  2. Random Crash.
  3. Reload savegame from autosave.
  4. Repeat step 2 and 3 for n times.
  5. Decide to make a manual save.
  6. Random Crash.
  7. Restart game.
  8. Load game from manual save file.
  9. auto saves continue ingame like normal.
  10. Random Crash.
  11. Restart game.
  12. (⊙ ‿ ⊙) ? plS wAt? When last autosave file is older than 1 hour despide the game continuing to autosave cycle like regular.
mklingen commented 5 years ago

Random Crash.

Okay, this is the real bug. Was there any kind of message printed when the game crashed? If the game is crashing it's possible or even likely that it was autosaving that caused the crash.

mklingen commented 5 years ago

Also, when loading a game it tells you which directory it's loading from. If you could navigate to that directory, is there anything in it?

mklingen commented 5 years ago

BTW I've got a crash auto reported during save that says a player was out of disk space. First thing would be to check to see if the drive DwarfCorp is trying to save to is full or not.

PaxJaromeMalues commented 5 years ago

The only thing in there is the autosave file from the game from yesterday where I died awfully by being supersnaked. Drive has 25GB free and there was no crash message displayed. I only get crash messages very very rarely. Usually the game just ends abruptly and throws me back to the Win10 desktop.

PaxJaromeMalues commented 5 years ago

The only stuff that I could find in log.txt are these:


   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at DwarfCorp.GameComponent.ReceiveMessageRecursive(Message messageToReceive) in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Components\GameComponent.cs:line 156
   at DwarfCorp.VoxelChunk.Rebuild(GraphicsDevice g) in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Voxels\VoxelChunk.cs:line 172
   at DwarfCorp.ChunkManager.RebuildVoxelsThread() in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Voxels\ChunkManager.cs:line 196```
on 13. Dec 2018

Autosave messages got logged like if they ran normally.

I tho have to say that I since deleted the world all that occured on.
PaxJaromeMalues commented 5 years ago

Ok I continued to play another round and I got to say that autosave malfunctioned again. Saves every 5 mins -> crash -> oldest save from 36minutes ago. IDK what this is.

mklingen commented 5 years ago

when you say the game crashed, that was a crash to desktop with no popup window with an exception?

mklingen commented 5 years ago

This could also be the auto-delete logic messing up. DwarfCorp deletes your old auto saves when you create new ones. If the new saves are failing, the auto delete logic might still delete the old one.

PaxJaromeMalues commented 5 years ago

This is the message I received on the crash mentioned in my last post: Originally posted by @PaxJaromeMalues in https://github.com/CompletelyFairGames/dwarfcorp/issues/981#issuecomment-454799457

OS Version: 6.2.9200.0
OS Platform: Win32NT
OS SP: 
OS Version String: Microsoft Windows NT 6.2.9200.0
System.NullReferenceException: Object reference not set to an instance of an object.
   at DwarfCorp.Scripting.Gambling.PushParticipants() in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Scripting\Gambling.cs:line 156
   at DwarfCorp.Scripting.Gambling.Update(DwarfTime time) in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Scripting\Gambling.cs:line 204
   at DwarfCorp.GameMaster.Update(DwarfGame game, DwarfTime time) in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Scripting\Player\GameMaster.cs:line 448
   at DwarfCorp.WorldManager.Update(DwarfTime gameTime) in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\World\WorldManager.cs:line 581
   at DwarfCorp.GameStates.PlayState.Update(DwarfTime gameTime) in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\GameStates\PlayState.cs:line 289
   at DwarfCorp.GameStates.GameStateManager.Update(DwarfTime time) in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\GameStates\GameStateManager.cs:line 132
   at DwarfCorp.DwarfGame.Update(GameTime time) in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\DwarfGame.cs:line 604
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
   at Microsoft.Xna.Framework.GameHost.OnIdle()
   at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
   at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Microsoft.Xna.Framework.WindowsGameHost.Run()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at DwarfCorp.Program.Main(String[] args) in C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Program.cs:line 88

That is the last crash message I received. Also the first time I received any crash including a popup when it crashed! Usually it just drops back to the windows desktop w/o any notification whatsoever.

mklingen commented 5 years ago

That's #985 , which has been fixed.

PaxJaromeMalues commented 5 years ago

In that case I have no idea what the autosave issue could be :/