Gramps crashed, locked tree, now I may have lost 3 hours of work

Windows 11
Gramps 5.1 (I think?) (Edit: it is 5.15)

I had been working on my tree for about 3 hours, input tons of new data, and then Gramps suddenly crashed/closed itself. This has happened to me once before and when I unlocked the tree I was set back to the time I first accessed the tree (hours earlier, much like now) and I lost everything I’d put in. Now I’m back in the same situation, but I haven’t unlocked the tree yet because I’m hoping there’s a way to get back the hours of data I just put in. When I look at “date last accessed” it’s reading from about 3 hours ago so I’m kind of panicking that I did all that work for nothing.

There’s also no manual save function, so I don’t know how to prevent this from happening in the future. I’m really hoping my edits are in there somewhere and I can access them again. Please help.

Crashes should be exceedingly rare. Did you use the Console version of Gramps? If you close the console window, that kills Gramps without any of the normal graces.

That is a misunderstanding. There IS a manual save, it is actually a backup feature. You can do that manually or set its automation preferences to backup every 15, 30 or 60 minutes. (5.2 added 12hr and 24hr interval options.) However, the default path for backups is … inconvenient. It puts the files in your base user directory.

Gramps does not commit a session of activity until you exit. (Or use a feature that does mass changes. But Gramps warns before doing that, saying that Undo history will be reset.) So unless you changed your backup settings, yes, you have probably lost those 3 hours of work. Sorry.

All productivity software risks loss of work. Whether from machine failures, user error, running too complex an environment for resources, or software glitches. So that is why automatic backup options exist.

Well that’s… horrible news. I’ve now lost about 7 hours of manual data entry work (about 3 of them making up after the first loss). I don’t know what the console version of Gramps is; I’m just using the downloaded software on my PC. Gramps has crashed twice for me in the past week, so I wouldn’t say crashes are exceedingly rare… I have no idea what’s causing the crashes but I can at least rule out CPU/memory issues based on my readings.

I guess I just took the first sentence of this) at face value, since changes are clearly not saved as soon as I apply them. I would strongly recommend re-wording this part of the manual because if I hadn’t seen that result when I searched “how to save” I would have certainly gone about things differently.

Thank you for telling me about the automation preferences as that should be very helpful in future (I’m not going to think to close out my session every 5 minutes just so I don’t lose everything). I’m going to have to take a break for a while before continuing with my tree, though, since I can’t even look at how much time and data I lost without choking up right now. Progress on digitizing my grandma’s genealogical records is just going to have to wait until I’m in a better mental state to tackle all those data points again. I would certainly have given up on Gramps altogether if it weren’t the next best option I’ve used after MacFamilyTree (which I can’t get on my PC), so hopefully things go more smoothly in the future.

That is not true. Every time you edit a primary object and then click the “OK” button the data is saved.

You can easily test this. Load the example database, then edit the name of the home person. Click “OK” in the person editor and then kill Gramps. Start Gramps again and after breaking the lock you will able to see the change.

@gattinarubia What database backend are you using?

1 Like

Doesnt it commit to the proxy, not the database file?

When I’ve killed the task rather than exited normally, I’ve lost entries.

Nick is infinitely more knowledgable about Gramps than I am. (He’s the software architect, after all.) My knowledge is just from observed behavior. But he also works from Linux while the Windows version has its own set of quirks.

Under Windows, there are 2 Gramps application icons available from the Start Menu. They will be named similarly except 1 will end with “-console”.

The console version opens a DOS shell terminal (or “console”) window. (Black background whith white text.) Then runs Gramps from a batch file. Any feedback, warning or error messages are displayed in the console. But… if you close the Console window, it is just like using the Task Manager to kill Gramps.

None of the normal software exit’s housekeeping is done.

After an edit, we write the data to the database as a transaction. Depending on this backend, this could be written to cache. The default SQLite settings that we use are chosen to minimise the risk of data loss.

You could lose metadata, because it only saved at the end of a session. The metadata can always be rebuilt though.

1 Like

Yes. My PC is too old to run Windows. I plan to upgrade to something newer when I can find the time.

Are you sure that you get data loss in Windows with the test that I described in my earlier post?

Just did tests of a simple rename of a Person, OK’d the edit Person dialog, and killed the console. That recovered the edited data.

Then started a new session, created a Tree, loaded tree, added a (male) person, added a family, dragged the person to the father, OK’d the Edit Family dialog, and killed the console. That ALSO recovered the edits.

This was with 5.2.1 version of Gramps.

Of course as you could predict, a forced exit with the console where there is an open edit dialog, the edits in that dialog were lost. The OK button hadn’t been pressed to commit the dialog.

I have distinct recollections of losing entire sessions of data back when using BSDDB with 4.2.x versions of Gramps. (Those experiences left a mark!) Perhaps 5.x and/or SQLite handled session data differently? (My Gramps use started around 2014 in the 4.1.x era.)

Please don’t take that as a criticism.

I doubt anyone expects you to invest in a Windows box. The responsibilities of software architect for the core in Linux is plenty for any single person. Distracting you with current Windows, macOS, a different Linux distribution, Gramps Web on servers (hosted or on local server or Raspberry Pi) or possible future mobile OSes, ChomeOS, VR GUIs could hurt the project badly.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.