Windows update reboots

Strange, haven’t had the OS disobey the active hours setting even once here. Anyway, since this thread is about how to get Sumatra to deal better with unexpected reboots I won’t waste time attempting to elicit more information from you to diagnose what may be wrong with your system.

I’ve been using the pre-release v3.2.10766 64-bit version for a while now, and the “session restore” (or whatever we’re calling it) is not working. The last 2 days my PC at work has locked up at some point overnight. When I reboot, Sumatra opens with no files open.

I think some of those who’ve successfully observed session-restore work, may be restarting Windows “gracefully”, which is not the same as things like power-loss, lockup, etc.

I really like the “lightness” and simplicity of Sumatra, but this one basic issue is making it not-useful for me.

I’m happy to send any additional information which could help diagnose this issue.

Your long term problem must be very frustrating
It is natural that during a sudden brown out / power outage or other lock-up of your system the working session cannot be saved, what is unusual is that the (at that time) session file seems to be reset to zero in some way.

have you tried saving it as per your comment to manually save Windows update reboots on Dec 6th and my reply Windows update reboots see also details on Windows update reboots

A question may be raised about passwords to open PDFs since they also are saved in the settings.ini file

If the file is reset they would also be “forgotten”, if so this IS related since it appears SumatraPDF does not keep a back-up of the settings file during such an event, and thus the solution is the same as for others (keep your OWN back-up.)

It IS frustrating that during an all too frequent crash of supposedly military grade applications that it WILL insist on replacing the latest work file with a much older system back-up, it is difficult to find a balance between keeping a current work file in reserve (which could itself be corrupt) or spending weeks rebuilding from sources so I manually keep my own back-up copies on a regular basis thus only losing a couple of hours of most recent work

Just lost all my open tabs again on a windows update reboot. Still using 3.2.10766 pre-release 64bit version. Hasn’t happened in a while,but I just lost about 20 tabs.

Just lost all my tabs yet again due to system reboot in the night.

I don’t understand which setting you have turned off ?

My machine has been pestering me every few minutes for hours today to close everthing
Since it wants to screw up my machine with a monthly update,
but I’m strongly resisting since I lost gazzilions of data last time
I said yes to “Are you Really sure, to be sure.”

In Windows 10 Home edition, you can’t turn off automatic updates or even tell windows to download them and wait for you to install them. So windows waits until the machine is not busy, downloads, installs, and reboots.

On my laptop, which is not on all the time, the behaviour is as you describe above. It tells me it wants to do it and pesters me to close things. But with my desktop which is always on, Win 10 just does it in the middle of the night, no warning.

This is not a new issue, this is something people have been complaining about with Windows 10 Home edition since the first surprise update. There are a few work arounds, but they are clunky. Check this out:

Ok I now understand it is the same as living in the Bermuda thunderstorm triangle, eventually you get hit, like it or not.

My best suggestion was always keep a back-up of your settings file (however I don’t bother)
There are ways to duplicate on a time schedule with a time/date in name so you would only need to go back to yesterday pm

Yeah, that’s what I’ve finally resorted to. Just installed a little proggie to back up the settings.txt file daily. Should save my bacon.

1 Like

Just be cautious that a copy of a bad settings file can be worse than none at all, one or two issues were raised because the user had made poor entries but it is easy to delete the file and let it renew itself on start-up.

So when your “proggie” backs up the settings file keep a second
copy without overwrite since bad on bad is to be avoided

I always keep losing my PDF’s due to Windows updates or crashes as well and it’s driving me mad. 3.1.2 still seems to be the most recent version, so I take it my only choice is to switch to the pre-release version? Does that have some other drawbacks (like instability) as it hasn’t made it to the actual release yet?

Pre-release will not as such protect you from windows shutting SumatraPDF in an uncontrolled manner. My suggestion for that issue has been to use a secondary copy of the settings file (at worst that sets you back to session before last)
Note I very very rarely get unknown shut downs and apart from my own stupidity in deleting the settings file on occasions (while testing) I have never lost session history
However I am using 10pro and all settings are to warn me to close applications before monthly updates.

Pre-release has considerable improvements over the few years but still has some known issues so for example is less useful for printing using the external command line.

Equally the highlight function has only changed trigger key to A, i.e. there have been no improvements in that code.

Thank you for the suggestion. However, I think manually copying and maintaining a secondary settings file is quite inconvenient and something I don’t want to have to remember. My laptop runs out of battery at least once a week which is usually why I lose the tabs (Windows updates or other updates required by the company are another cause).

Couldn’t Sumatra automatically make a backup of the settings file for recovering the session after crashes (which I assume is what Chrome and other programs do that can recover the tabs)? I wonder also if keeping the settings file in Dropbox (where it syncs until a crash) would help…

Your dropbox suggestion may have mixed blessings (some have had problems with it NOT overwriting correctly) I can not say if SumatraPDF-settings.txt will get zeroed on shutdown but it could be worth a try, especially if it is set to any mapped drive.

There is an undocumented parameter you could to add to your startup (icon shortcut etc.) so wherever you start SumatraPDF you could change the command from SumatraPDF.exe to SumatraPDF.exe -appdata c:\my dropbox\folder (first put a copy from last session there otherwise it will build an empty default copy, so that would be proof it is found :slight_smile:
I personally (if it was an issue to me) would just script a start-up that included an appdata test for a empty/default txt file and restored last good session ( I have about 20 different test configurations), but accept that it would be better if done by SumatraPDF as “case hardening” for history.

I have been trying this solution. I have a copy of my sumatrapdf-settings.txt file copied every couple of days. It worked for a while that when the machine was autobooted by MS, all I had to do was copy the backup sumatrapdf-settings.txt file over the active copy in C:\Users\me\AppData\Roaming\SumatraPDF\SumatraPDF-settings.txt and then when I started up sumatra, I’d get all the tabs open that were open in that backup. Pretty good solution as the open tabs don’t change a ton from day to day.

But lately this solution is no longer working. I copy the backup file over, fire up the program, and get no open tabs.

I’m using v3.1.2 64-bit

Any ideas why this is no longer working as a workaround?

Off hand I see no reason at all but

If the same backup is not working that first suggests the backup is faulty so need to try build fresh small test file (say just 4 files open)

If system has not been shutdown naturally for a while there could be more than one sumatraPDF in memory and one is not respecting the file changes

There may be a second copy e.g. in the .exe folder that has priority like a portable copy keeps it there