View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001777 | Dwarf Fortress | Technical -- General | public | 2010-05-05 22:17 | 2017-05-17 14:21 |
Reporter | The Architect | Assigned To | |||
Priority | high | Severity | block | Reproducibility | have not tried |
Status | new | Resolution | open | ||
OS | Vista | ||||
Product Version | 0.31.03 | ||||
Summary | 0001777: Multiple instances of DF can run simultaneously in same folder, resulting in save corruption | ||||
Description | Saving simultaneously in duplicate DF applications causes corruption in one or more. "One of the compressed files on disk has errors on it. Restore from backup if you are able." | ||||
Steps To Reproduce | Back up your data/save folder. Open DF twice from the same copy, open two separate forts. Save both simultaneously. If the program manages to complete both saves, attempt to open the files. | ||||
Tags | No tags attached. | ||||
|
Most likely because they're sharing the "current" folder. That was probably the motivation for this old bug entry: # 000020 □ [technical] (http://www.bay12forums.com/smf/index.php?topic=21812.0) stop multiple copies of the program from being open |
|
confirmed still in 0.31.10 |
|
This doesn't seem like high priority: you're doing something OUTSIDE the game, that you know will break the game. Should this be closed as 'working as intended'? |
|
As I mentioned in the first note, this was in the old bug list that Toady used to maintain (dev_bugs.html). |
|
If he never got around to fix it, maybe he doesn't know how? He may need some help then. I have little experience as a programmer, but this doesn't sound like something that would demand a lot of time. |
|
well you would think people would refrain from opening multiple game windows. |
|
Multiple instances of DF being able to load the same save is a good thing. However, it should probably balk at overwriting a save that doesn't match the one it loaded (say, store a version number somewhere). If that happens, it could maybe offer to save in a different folder. That's getting pretty far away from the "permanent death" ideal, but I don't like permanent death anyway. :p |
|
I recently had to run two DF instances at once, so I'm glad it's possible. Assuming you don't attempt to save, and kill both processes with killall/SIGTERM, is there any possible way DF can corrupt any of its files? As far as behavior, the only change that could be added is: locking on a lock-file in the region folder when saving, so that another process doesn't try to simultaneously save and corrupt the files. |
|
If you don't save, as far as I know, the only files that will be touched are those in data/save/current, which is cleared periodically. However, I would still recommend not doing what you did, because DF could be confused if it tries to read files from data/save/current and gets files from another save, or if it fails to read files that the other DF process deleted already. As for your locking suggestion, that wouldn't prevent corruption, because if data/save/current contains files from two different saves, they'll still be copied into the wrong region folder(s). |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-05-05 22:17 | The Architect | New Issue | |
2010-05-05 22:25 |
|
Note Added: 0006241 | |
2010-05-05 22:27 |
|
Note Edited: 0006241 | |
2010-06-29 07:38 |
|
Category | Technical => Technical -- General |
2010-07-11 16:50 |
|
Relationship added | has duplicate 0002641 |
2010-07-11 16:50 |
|
Summary | Saving simultaneously with two DF programs causes file corruption => Multiple instances of DF can run simultaneously in same folder, resulting in save corruption |
2010-07-11 17:17 | shibdib | Note Added: 0009985 | |
2012-03-01 02:14 |
|
Relationship added | has duplicate 0005518 |
2012-03-01 06:04 | zombiejustice | Note Added: 0020942 | |
2012-03-01 07:08 |
|
Note Added: 0020943 | |
2012-03-01 09:00 | thvaz | Note Added: 0020947 | |
2012-03-01 09:02 | Xotano | Note Added: 0020948 | |
2012-09-20 08:04 |
|
Relationship added | has duplicate 0006204 |
2013-06-06 15:11 | Brilliand | Note Added: 0023994 | |
2014-01-20 19:06 |
|
Relationship deleted | has duplicate 0006204 |
2017-05-11 13:16 | alexchandel | Note Added: 0036522 | |
2017-05-17 14:21 | lethosor | Note Added: 0036537 |