Forum moved here!

Home / Settings not restored after improper shutdown

hari108

SumatraPDF (portable) is my default pdf viewer. So, most of the time I have several documents open and I can see that the SumatraPDF-settings.txt has all the details of them. When I exit out of Sumatrapdf and open it again, all the previous documents also open with the last state. All this is because the files and status are stored. When my computer crashes or windows does the automatic restart after updates without my knowing about it, my files and their status are lost. So, What I do is backup the SumatraPDF-settings.txt. But when I replace the default SumatraPDF-settings.txt with the one I back up, I do not get those file and status open in SumatraPDF when I open it. Why does it happen even though all settings are supposed to be stored in SumatraPDF-settings.txt.
How can I resolve this?

kjk

Latest pre-release fixes the issue caused by windows reboot.

I can’t really say what happens it your situation. Sumatra does what SumatraPDF-settings.txt tells it to do. If it doesn’t do what you expect, it’s because the information isn’t in the file.

In general backing up and restoring SumatraPDF-settings.txt doesn’t do anything. The issue is that we save the state of the application to SumatraPDF-settings.txt only when new files are opened or saved etc. but not e.g. after scrolling the document. State has changed but we don’t want to write to settings file so frequently.

hari108

Thank you for your reply.
Will it help to add an option to save the file and states once a day?

robodude

Hi everyone,
My computer has a problem and it automatically shutdown, therefore I lost all the history opened files.
I found a lot of links in SumatraPDF-settings file, but I do not know how to configure it to make it open again.
Could you please suggest a solution to my problem.
Thanks!

GitHubRulesOK

This is related to the fact that SumatraPDF would only save the session at time of a clean EXIT

So if you crash the list was empty, Once you are happy with a session you could manually Exit and save (backup) the settings file so you can replace it after either a crash or unintended reboot

This has now been improved in prerelease which in turn will be included in version AFTER 3.2.0

GitHubRulesOK

@hari108
There has been yet another change to current prerelease which improves the settings storage issues you previously experience.