Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: [40d]Sudden-Shutdown-Safe Savegames  (Read 2602 times)

Destroyer224

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #15 on: November 15, 2008, 01:17:10 pm »

Closing DF using Task Manager (Ctrl+Alt+Del) does not corrupt the save files in the slightest. And no, this problem only occurs when I have run DF and saved a game, I can have all the power outages I want and any savegames not modified (I.E: saved over) while the computer was on during that particular time will be just fine. This only happens specifically when the computer shuts off suddenly and without warning. Whether or not DF is running at the time does not matter, if during the time span wherein the computer had been on I save a game of DF, the save would become corrupt with one of these outages, which is what makes it all the more annoying.

To make it as clear as possible:

Timeline= Boot Windows -> Do anything (optional) -> Run DF and save a game -> Do something else (optional) -> Sudden loss of power -> Savegame Corrupt

Timeline= Boot Windows -> Run DF and save *game1* -> Normally shut down computer -> Boot Windows again -> Run DF and save *game2* -> Sudden loss of power -> *game1* is fine, *game2* is corrupted
« Last Edit: November 15, 2008, 01:20:54 pm by Destroyer224 »
Logged

Fuzzy

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #16 on: November 24, 2008, 09:06:31 am »

This is not a Dwarf Fortress thing, but a Windows thing that's been around since Windows 95. To wit, any time your machine does not go through the Shutdown process when turning off, Windows may randomly corrupt several files without saying anything. It's one of those bugs that's terribly insiduous because you can go years before you realize there's any damage.

Seriously, get a UPS. I had to deal with greyouts when I was living in Newark, OH. I actually sustained damage to my old computer due to the fluctuating voltage. If you do a quick search on PriceWatch, you can even find very cheap UPSes since all you need is a few seconds of power (although if you buy only enough for a few seconds, I recommend not hooking your monitor in and turning off the "shut off when battery is at critical levels" setting so as to avoid having to restart your computer, albeit with non-corrupted save files this time).
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #17 on: November 24, 2008, 09:25:58 am »

This is not a Dwarf Fortress thing, but a Windows thing that's been around since Windows 95. To wit, any time your machine does not go through the Shutdown process when turning off, Windows may randomly corrupt several files without saying anything. It's one of those bugs that's terribly insiduous because you can go years before you realize there's any damage.

Huh.  It can't be a totally random bug if this guy can reproduce it on his machine and I've never seen it on mine.  Do you know of any particular settings or circumstances that cause it?
Logged

andrea

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #18 on: November 24, 2008, 09:54:53 am »

so... that is why i lost my save???

hateful.
at leats not i know what happened  :'(

Calessa Lynn Orphiel

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #19 on: November 24, 2008, 02:09:24 pm »

This is not a Dwarf Fortress thing, but a Windows thing that's been around since Windows 95. To wit, any time your machine does not go through the Shutdown process when turning off, Windows may randomly corrupt several files without saying anything. It's one of those bugs that's terribly insiduous because you can go years before you realize there's any damage.

Seriously, get a UPS. I had to deal with greyouts when I was living in Newark, OH. I actually sustained damage to my old computer due to the fluctuating voltage. If you do a quick search on PriceWatch, you can even find very cheap UPSes since all you need is a few seconds of power (although if you buy only enough for a few seconds, I recommend not hooking your monitor in and turning off the "shut off when battery is at critical levels" setting so as to avoid having to restart your computer, albeit with non-corrupted save files this time).

The UPS bit is good advice, but your opening statement about randomly corrupting files is almost 100% wrong. 

It sounds to me like Dwarf Fortress is not properly closing itself down on his machine, and thus while the program appears closed, the process is still running, and isn't saving the files properly.  In the process of shutting down, the process is terminating and finishing saving the files correctly.  A power failure prevents the proper closure of the process.

I would think this may be a bug in the code for saving files.  The question is, what part of OPs configuration is causing the behavior.
« Last Edit: November 24, 2008, 02:12:00 pm by Calessa Lynn Orphiel »
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #20 on: November 24, 2008, 05:24:29 pm »

^^^ The process shouldn't have to terminate to finish the write, though.  If the OS is forcing it to, that's an OS problem.
Logged

scribbler

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #21 on: November 24, 2008, 06:54:45 pm »

Yeah, they should have never removed the write verify options.
Try turning on autosave at least that way you never have to go back more than a season.
Logged
End the slaughter of dorf kittens!
No self respecting beard wants to wear his pet as clothing! Dorfs need population control for pets and bad thoughts from products made from the animals they choose to bond with.
---------
"There are two means of refuge from the miseries of life: music and cats."
-Albert Schweitzer

Taritus

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #22 on: November 24, 2008, 10:36:32 pm »

Yay, saving the day...  Well not really.  Just giving the OP some bad news.

If you have an HDD over 4gb then you probably have it formatted as NTFS.  NTFS systems allow for much greater storage (FAT32 maxes at 4gb or so, technically 2^32bytes), but they also write when it's convenient, which isn't right after you quit DF.  Your problem lies with your hard drive, and unless you switch to some form of ext format, I don't think you can fix this problem.

*NOTE: ext formats are, afaik, only viable for Unix-based (Maybe just Linux-based) operating systems.

EDIT: Idea.  You could partition your drive with a small FAT32 partition, and it may work, though I don't think it would you could try.  The best solution is to, in fact, run off a flash drive.
« Last Edit: November 24, 2008, 10:39:53 pm by Taritus »
Logged



Manchild

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #23 on: November 26, 2008, 06:06:56 am »

or everyone could be completly wrong about it being either DF or the os....meybe it is a mutual conflict....i have a slightly simmilar problem with my Mozilla Firefox randomly deleting/corrupting files that are assoc. with it when i suffer a power outtage........


or could it be any other piece of hardware(IE ram or ur processor)?
im not too sure on the technical parts....i should get my younger bro in here...he is a master with the tech garbage.....
Logged
There are two types of Christians:
Those that believe in God,

And those that suffer from retardation.

scribbler

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #24 on: November 26, 2008, 10:44:06 am »

DF is alpha software, as is windows only not as developed. ;)
PS You may not want to refer to his passion as garbage. As a tech there was nothing I liked more than hearing my vocation referred to as "that computer crap."
Logged
End the slaughter of dorf kittens!
No self respecting beard wants to wear his pet as clothing! Dorfs need population control for pets and bad thoughts from products made from the animals they choose to bond with.
---------
"There are two means of refuge from the miseries of life: music and cats."
-Albert Schweitzer

Taritus

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #25 on: November 26, 2008, 11:35:29 pm »

And my post goes ignored.  The drive is NTFS, without a doubt.  That's his problem.  NTFS doesn't write everything to the disk as it happens, part is put in RAM or other temporary storage while it awaits to be written.  When you lose power and reboot your RAM clears and nothing gets written.
Logged



Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #26 on: November 27, 2008, 08:51:15 am »

^^^ That can't be the sole cause.  Anyone running on XP or Vista is almost certainly using NTFS, but this problem is totally unheard of.
Logged

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #27 on: November 27, 2008, 10:59:16 am »

^^^ That can't be the sole cause.  Anyone running on XP or Vista is almost certainly using NTFS, but this problem is totally unheard of.
Totally not mentioned is more precise.
It happens to me sometimes when I'm closing DF normally due to a high-usage program being run.
DF doesn't get the RAM/time it needs to write the savegame successfully, it doesn't say anything about it, savegame is corrupted.
Logged
Mishimanriz: Histories of Pegasi and Dictionaries

Manchild

  • Bay Watcher
    • View Profile
Re: [40d]Sudden-Shutdown-Safe Savegames
« Reply #28 on: November 28, 2008, 12:03:18 pm »

isnt the ntfs thing the same thing as sying that this should happen when you randomly yyank out your power cord. ive tried to simulate this by randomly yanking the power cable after i save and ive got nuttin.....so wouldnt that kinda disprove that?


as to the techie garage and my brother.....im mostly just jealous. he is 17 and has been offered jobs that pay DOUBLE my job as a starting wage. I am a 19 year old cook at KFC and am making just over 8.00 USD an hour.....8-15 hours a week.....so im jealous that i couldnt get jobs like that when i was still in HS........i took the same classes as him and ended up with a minimim wage job...see how u feel in my situation......


but i digress and went way off topic there......so would that not simulate a power outtage situation? yanking the power cord that is.....?if so then why does it not replicate the problem for me....im using xp sp 3...i may have said two in a post somewhere....i was wrong......my techie bro corrected me.
Logged
There are two types of Christians:
Those that believe in God,

And those that suffer from retardation.
Pages: 1 [2]