Hi,

I am using SumatraPDF v3.3.3 64-bit.

I would like SumatraPDF to restore the previous session every time it starts. This never happens, despite my setting RestoreSession = true.

This is likely because when I exit SumatraPDF, the program automatically erases the SessionData section of SumatraPDF-settings.txt.

I came to that conclusion by comparing the SumatraPDF-settings.txt file *during* a session (just before Exit), to the SumatraPDF-settings.txt just *after* Exit.

Here is an example. Just before Exit:

```
# For documentation, see https://www.sumatrapdfreader.org/settings/settings3-3-1.html
MainWindowBackground = #80fff200
EscToExit = false
ReuseInstance = true
UseSysColors = false
RestoreSession = true
TabWidth = 300
FixedPageUI [
TextColor = #000000
BackgroundColor = #ffffff
SelectionColor = #f5fc0c
WindowMargin = 2 4 2 4
PageSpacing = 4 4
HideScrollbars = false
]
EbookUI [
FontName = Georgia
FontSize = 12.5
TextColor = #5f4b32
BackgroundColor = #fbf0d9
UseFixedPageUI = false
]
ComicBookUI [
WindowMargin = 0 0 0 0
PageSpacing = 4 4
CbxMangaMode = false
]
ChmUI [
UseFixedPageUI = false
]
ExternalViewers [
]
ShowMenubar = true
ReloadModifiedDocuments = true
FullPathInTitle = false
ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
ZoomIncrement = 0
PrinterDefaults [
PrintScale = shrink
]
ForwardSearch [
HighlightOffset = 0
HighlightWidth = 15
HighlightColor = #6581ff
HighlightPermanent = false
]
Annotations [
HighlightColor = #ffff00
]
CustomScreenDPI = 0
RememberStatePerDocument = true
UiLanguage = en
ShowToolbar = true
ShowFavorites = false
AssociateSilently = false
CheckForUpdates = true
RememberOpenedFiles = true
EnableTeXEnhancements = false
DefaultDisplayMode = automatic
DefaultZoom = fit width
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
TocDy = 0
TreeFontSize = 0
ShowStartPage = true
UseTabs = false
FileStates [
[
FilePath = G:\AMS eBooks\chel382 Generalized Functions, Volume 6 - Representation Theory and Automorphic Functions.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 -1
PageNo = 1
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel381 Generalized Functions, Volume 5 - Integral Geometry and Representation Theory.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 71.4693
PageNo = 293
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel380 Generalized Functions, Volume 4 - Applications of Harmonic Analysis.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 357.345
PageNo = 35
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel379 Generalized Functions, Volume 3 - Theory of Differential Equations.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 46.7003
PageNo = 177
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel378 Generalized Functions, Volume 2 - Spaces of Fundamental and Generalized Functions.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 246.4
PageNo = 177
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel377 Generalized Functions, Volume 1 - Properties and Operations.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 150.42
PageNo = 30
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
]
SessionData [
[
TabStates [
[
FilePath = G:\AMS eBooks\chel377 Generalized Functions, Volume 1 - Properties and Operations.pdf
DisplayMode = continuous
PageNo = 30
Zoom = fit width
Rotation = 0
ScrollPos = -1 150.42
ShowToc = true
]
]
TabIndex = 1
WindowState = 2
WindowPos = 724 0 562 728
SidebarDx = 150
]
[
TabStates [
[
FilePath = G:\AMS eBooks\chel378 Generalized Functions, Volume 2 - Spaces of Fundamental and Generalized Functions.pdf
DisplayMode = continuous
PageNo = 177
Zoom = fit width
Rotation = 0
ScrollPos = -1 246.4
ShowToc = true
]
]
TabIndex = 1
WindowState = 2
WindowPos = 724 0 562 728
SidebarDx = 150
]
[
TabStates [
[
FilePath = G:\AMS eBooks\chel379 Generalized Functions, Volume 3 - Theory of Differential Equations.pdf
DisplayMode = continuous
PageNo = 177
Zoom = fit width
Rotation = 0
ScrollPos = -1 46.7003
ShowToc = true
]
]
TabIndex = 1
WindowState = 2
WindowPos = 724 0 562 728
SidebarDx = 150
]
[
TabStates [
[
FilePath = G:\AMS eBooks\chel380 Generalized Functions, Volume 4 - Applications of Harmonic Analysis.pdf
DisplayMode = continuous
PageNo = 35
Zoom = fit width
Rotation = 0
ScrollPos = -1 357.345
ShowToc = true
]
]
TabIndex = 1
WindowState = 2
WindowPos = 724 0 562 728
SidebarDx = 150
]
[
TabStates [
[
FilePath = G:\AMS eBooks\chel381 Generalized Functions, Volume 5 - Integral Geometry and Representation Theory.pdf
DisplayMode = continuous
PageNo = 293
Zoom = fit width
Rotation = 0
ScrollPos = -1 71.4693
ShowToc = true
]
]
TabIndex = 1
WindowState = 2
WindowPos = 724 0 562 728
SidebarDx = 150
]
[
TabStates [
[
FilePath = G:\AMS eBooks\chel382 Generalized Functions, Volume 6 - Representation Theory and Automorphic Functions.pdf
DisplayMode = continuous
PageNo = 1
Zoom = fit width
Rotation = 0
ScrollPos = -1 -1
ShowToc = true
]
]
TabIndex = 1
WindowState = 2
WindowPos = 724 0 562 728
SidebarDx = 150
]
]
TimeOfLastUpdateCheck = 30914763 1689483935
OpenCountWeek = 561
# Settings after this line have not been recognized by the current version
```

Just after Exit:

```
# For documentation, see https://www.sumatrapdfreader.org/settings/settings3-3-1.html
MainWindowBackground = #80fff200
EscToExit = false
ReuseInstance = true
UseSysColors = false
RestoreSession = true
TabWidth = 300
FixedPageUI [
TextColor = #000000
BackgroundColor = #ffffff
SelectionColor = #f5fc0c
WindowMargin = 2 4 2 4
PageSpacing = 4 4
HideScrollbars = false
]
EbookUI [
FontName = Georgia
FontSize = 12.5
TextColor = #5f4b32
BackgroundColor = #fbf0d9
UseFixedPageUI = false
]
ComicBookUI [
WindowMargin = 0 0 0 0
PageSpacing = 4 4
CbxMangaMode = false
]
ChmUI [
UseFixedPageUI = false
]
ExternalViewers [
]
ShowMenubar = true
ReloadModifiedDocuments = true
FullPathInTitle = false
ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
ZoomIncrement = 0
PrinterDefaults [
PrintScale = shrink
]
ForwardSearch [
HighlightOffset = 0
HighlightWidth = 15
HighlightColor = #6581ff
HighlightPermanent = false
]
Annotations [
HighlightColor = #ffff00
]
CustomScreenDPI = 0
RememberStatePerDocument = true
UiLanguage = en
ShowToolbar = true
ShowFavorites = false
AssociateSilently = false
CheckForUpdates = true
RememberOpenedFiles = true
EnableTeXEnhancements = false
DefaultDisplayMode = automatic
DefaultZoom = fit width
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
TocDy = 0
TreeFontSize = 0
ShowStartPage = true
UseTabs = false
FileStates [
[
FilePath = G:\AMS eBooks\chel382 Generalized Functions, Volume 6 - Representation Theory and Automorphic Functions.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 469.321
PageNo = 137
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel381 Generalized Functions, Volume 5 - Integral Geometry and Representation Theory.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 71.4693
PageNo = 293
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel380 Generalized Functions, Volume 4 - Applications of Harmonic Analysis.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 357.345
PageNo = 35
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel379 Generalized Functions, Volume 3 - Theory of Differential Equations.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 46.7003
PageNo = 177
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel378 Generalized Functions, Volume 2 - Spaces of Fundamental and Generalized Functions.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 246.4
PageNo = 177
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
[
FilePath = G:\AMS eBooks\chel377 Generalized Functions, Volume 1 - Properties and Operations.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 1
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 150.42
PageNo = 30
Zoom = fit width
Rotation = 0
WindowState = 2
WindowPos = 724 0 562 728
ShowToc = true
SidebarDx = 150
DisplayR2L = false
ReparseIdx = 0
]
]
SessionData [
]
TimeOfLastUpdateCheck = 30914763 1689483935
OpenCountWeek = 561
# Settings after this line have not been recognized by the current version
```

I have tested this with three methods of closing SumatraPDF:

(a) File menu â Exit

(b) End task using Task Manager

(c) Shut down of the PC

In all three cases, SessionData is empty after the exit, even though SessionData had several entries just before the exit.

What should I do to make RestoreSession work?

Many thanks for your advice!