Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uhm... the app just deleted everything #109

Open
rvttor opened this issue Dec 9, 2023 · 17 comments
Open

uhm... the app just deleted everything #109

rvttor opened this issue Dec 9, 2023 · 17 comments

Comments

@rvttor
Copy link

rvttor commented Dec 9, 2023

I went to check how many hours I had in a certain game and every data I have been tracking for nearly a year had just vanished? Something similar had happened once but it was just a bug with the filters, this time i tried everything and it won't come back so it's probably hopeless at this point, so i'm not really looking for a solution, just to inform people that there is not much point to using a tracking program that will just cull itself completely out of the blue.
But thanks for the one year trial I guess.

@aardappel
Copy link
Owner

The app doesn't delete things like that, and it also keeps daily backups. It is very likely you can just restore it, as it describes on https://strlen.com/procrastitracker/ (search for db.PT)

@tamr
Copy link

tamr commented Jan 13, 2024

This happened to me also on the first run (~30min), db and backups were empty. But now it runs for a few weeks and been restarted a few time - seems ok. Would be great to edit the colors, tags and see the tag's time tooltip by hovering on the graph, now it shows the total time in the status bar.

@lslatr23
Copy link

lslatr23 commented Feb 8, 2024

I am regulary losing all records, like every 2-3 weeks or so. There is some database corruption issue or something like this. This should be no problem to fix nowadays I think.

And manually merging databases from backup is not so straightforward, you can then unknowingly add some records twice for example. This is the only major flaw of this program.

Maybe it should use real database instead of a file? Or some other mechanism, that the main database files does not get corrupted, some incremental writing or similiar technique, I dont really know about this topic. Maybe I should fork to procrastitracker-realDB :) . But I did not code or work with databases for the last 20 years, so the results would be dubious probably.

EDIT: not maybe loosing all records, but a lot of them, the database file gets smaller, I dont know how much exactly I have lost, but a lot. I don't know if all of them.

@aardappel
Copy link
Owner

No idea what could cause that, other than rebooting in the middle of a db write or so.. and even then, the start menu should have copies.

Been running this program for 15 years non-stop now without this ever occurring, and so have many others, so it is possible there is something on your system, like an anti-virus, that interferes, if it indeed happens regularly.

The current database is super compact and fast, which helps with keeping this program light weight so it can always run.

Even if there is a better database solution (which I am sure there is) I don't have have time to rewrite the entire app, a lot of the internal structure of the program is tied to the database format, and it is not a simple table structure either (it's a tree).

@lslatr23
Copy link

lslatr23 commented Feb 9, 2024

What I'am maybe thinking could be the culprint : some filenames/programs names contain UTF-8 or some special characters, and maybe the database handling does not like this when working with those strings, for example see the attached picture, there is a filename in BOLD, also some weird program names. I think when the program comes in contact with some weird window name/filename, something gets corrupted, and not saved. Or maybe saved correctly, but not loaded correctly afterwards. Just my two cents.

I think for example the file with filename
"yt5s.io-✨Fresh✨ - TIKTOK COMPILATION.mp4"
will corrupt the database when you run it in VLC. If you rename some random mp4 file to this filename, play it, then it will show in statitics, then close the VLC, exit procrastitracker, run procrastitracker. The tree will end up corrupted.

procrasti-stats
procrasti-stats2
procrasti-vlc2

@lslatr23
Copy link

lslatr23 commented Feb 10, 2024

I think also the program that messes up the database for me is called FAR MANAGER, becasue its window names contains some uncommon characters like this :

procrasti-farmanager

procrasti-farmanager2

@aardappel
Copy link
Owner

I used your example filename of yt5s.io-✨Fresh✨ - TIKTOK COMPILATION.mp4 and was able to save and then load a database with it in it just fine, the filename showed up correctly after loading.

I inspected the load/saving code, and it all seems safe with regards of UTF-8 handling.

I don't think there is any problem with far manager either, it parses the {} in a funny way because it doesn't use them as special characters.. but there is nothing wrong with them.

@bagajohny
Copy link

Where are the databases stored? Is it possible to manually delete database to clear all data?

@aardappel
Copy link
Owner

There should be a shortcut to all database files in your start menu.

@Erfaniom
Copy link

Erfaniom commented Jun 6, 2024

There should be a shortcut to all database files in your start menu.

can you be more precise? this tells me absolutely nothing, i am also losing my data every couple of days, from what i have seen the maximum it can keep seems to be 5 days

@aardappel
Copy link
Owner

this tells me absolutely nothing

Depending on your version of Windows, your start menu should be that thing that pops up from the windows symbol in the lower left corner of your screen. Please follow these instructions: https://support.microsoft.com/en-us/windows/open-the-start-menu-4ed57ad7-ed1f-3cc9-c9e4-f329822f5aeb
Then find and entry called ProcrastiTracker, followed by Database Files.

i am also losing my data every couple of days

No idea what would cause that.. see what you find in Database Files. You have something on your computer which either stops PT from reading/writing its files (like a rogue virus checker) or something that deletes them.

@Erfaniom
Copy link

Erfaniom commented Jun 7, 2024

this tells me absolutely nothing

Depending on your version of Windows, your start menu should be that thing that pops up from the windows symbol in the lower left corner of your screen. Please follow these instructions: https://support.microsoft.com/en-us/windows/open-the-start-menu-4ed57ad7-ed1f-3cc9-c9e4-f329822f5aeb Then find and entry called ProcrastiTracker, followed by Database Files.

can you just tell me the folder where they're saved?

@lslatr23
Copy link

lslatr23 commented Jun 7, 2024

They are somewhere in your user folder. But it will not help you, the problem , at least by my judgement, is because if storing/loading application names which have weird characters(unicode, utf, or whatever), or parsing weird characters, I don't know, I stopped using this program, which is a pity because it was the BEST solution for me. Maybe during sommer I will try to find the problem, but I'am not a good programmer.

@lepeter2010
Copy link

Would it be possible to create some protection or warning into the app when it crashes and restarts the database from zero?
It happened at least six times for me during the last 3 years, although I know it is much less then the biweekly crashes for others.
I know however that the last useful backup can be merged in as a workaround.

@lslatr23
Copy link

Is the .db file in this attachement corrupted? Because when I run PT, and the close it, the .db file is saved with smaller size. Either it was currupted during latest saving, or it was saved correctly, but is not loaded correctly when I open PT. Maybe it can help with debugging.
db.zip

@aardappel
Copy link
Owner

It getting a bit smaller on save is normal, it automatically merges nodes with very little time in them.

If a db loads, and you can see all the time tracked, it is not corrupted.

@aardappel
Copy link
Owner

@lslatr23 0 bytes are not a legal part of a UTF-8 sequence, so something else must be going on there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants