Is it possible to automatically delete the corrupted database file?

Very often, when I start the computer - ST does not start. The error logs that the database file is damaged. After his removal ST runs normally. Is it possible to automatically delete the corrupted database file when ST start? Logs from console: http://pastebin.com/4QKLrBaB

Under what circumstances does the database become corrupt? Per earlier threads here this seems to correlate with bad hardware or drivers actually corrupting data on disk and should be something to worry about in general. Dropping the database automatically would merely be a bandaid on the symptoms.

I agree about the symptoms. But I do not know the reason for failure. All other programs are working well, no crashes or buggy. ST only behaves strangely. Maybe we could add a separate key at startup, which would allow to automatically delete broken file.

The point is that the file shouldn’t be breaking, and the fact that it is is probably indicative of a problem with your hardware.

Yes, what else is systematically hashing part of your filesystem? Probably nothing. This is a great way to uncover problems with your hardware.

I think that if there was a problem with my hardware, then the problem would have manifested itself to other programs. For example, I constantly hangs to the computer, or some software working improperly, hung and buggy. But I have everything working perfectly, all the programs are working properly, the computer turns on and off correctly.

Only ST occasionally does not start because of a corrupted database file. I’m sure there is some flaw in the algorithms of the ST in creating the index files. If it was a mass problem, developers would have paid attention. But so far there are only a few cases.

Just for fun, you could try the boltdb build. It uses a different database backend, so any bugs in the current one are for sure not there. There may be others though, and possibly other failure modes if the root cause is some sort of hardware problem.