As the subject says: Explorer is no longer reliably preserving session
information. I usually have nine folder windows open on the same nine
directories, two of them with folder-tree panes and the rest normal, and
recreating them is a pain in the ass. Unfortunately, it's becoming more
and more necessary, because lately on any given reboot I'm as likely to
have seven, or three, or even zero of them appear after the restart as
to have all nine of them do so.

System is an XP media centre edition workstation with oodles of
everything (memory, CPU, disk space, free disk space...), service pack
2, and everything (just about; see below) up to date.

It used to drop them occasionally, usually if Explorer kept "not
responding" during shutdown. Now it drops them very frequently. Most
likely, some Windows Update screwed things up, since the jump in
frequency corresponds to a large batch of updates the other week,
including yet another unhiding of the "Windows Genuine Advantage
Notification" that I don't want and don't agree should be classed as a
"critical security update" since it doesn't improve the administrator's
control over their machine, and there are actually reports that it does
the opposite and makes it more likely for XP to decide it needs

Everything is up to date as of today except WGA notification, and one
update it keeps prompting me to download and install even though I've
done so a dozen times already. (It's been doing this for a year or more;
since I don't uncheck anything except, if it appears, WGA notification,
when I install a batch of updates this recalcitrant one gets
reinstalled, roughly monthly. It always claims success, yet shows up one
or two reboots later as needing to be downloaded and installed again.
Since I'm hardly about to install it and reboot after every reboot,
which would obviously result in an infinite loop and getting nothing
else done with the machine, I then ignore it until there's more than one
update showing up as new, meaning at least one *genuinely* new. The
recalcitrant update either doesn't install successfully but claims to
have done so incorrectly, or it does but is incorrectly reported as
new/missing later; if the former, the machine isn't quite up to date,
even leaving aside WGA notification. :P)

I tend to do quite a lot of image previewing and thumbnail browsing with
Explorer, and find that this seems to leak memory. This might be
related. So might getting odd behavior when some of the images are
45000x3000 TIFFs -- one of those previewed perfectly normally (if a bit
sluggishly) only for all of my open Explorer windows to close instead of
just the previewer when I closed the previewer one time. Another one
more recently, about 35000x2000, did nothing of the sort but selecting a
group of four files including the giant TIFF and dragging them to
another folder triggered an IPF box ("Explorer has performed an illegal
operation..."), which curiously was not modal and could be safely tucked
away in a corner of the screen out of the way and ignored. I worked
without a reboot or any difficulties, save one file having a stale lock
and being undeletable (it was in fact a copy of the giant TIFF), for
days after that, with the box sitting ignored in the lower right corner
of the screen, one corner just poking into view next to the taskbar
clock. The next reboot my folder windows again failed to reappear from
the preceding session, however.

As far as I can tell, Explorer is a bit buggy and unstable, more so when
working with pictures/thumbnails, even more so when doing so over a long
span of time without a reboot, as though it's cumulatively poisoned, and
especially since installing the latest round of MS updates. Obviously,
given the symptoms, there's a pointer arithmetic bug that causes
probabilistic gradual memory/malloc-arena corruption in Explorer
connected with, most likely, the JPEG decoder or the image/icon caching
code. Boosting the size of the icon cache to several thousand made the
problems less frequent and severe, supporting the conclusion that this
is where the pointer bug lies. Most likely, there's a subtle algorithm
error that leads to some blocks being double-freed (causing corruption)
and others left unfreed (causing the observed leak). Unfortunately,
while updates are supposed to fix this sort of bug, none has done so and
a recent one appears to have made something worse.

The failure to completely remember session state across restarts is
likely caused by the same memory corruption, which may directly mess up
the state or simply cause Explorer to abnormally terminate during
shutdown before it gets the chance to store it on disk. Of course, to
top it off, the lazy bastards at Redmond obviously neglected to use a
backup strategy of "write new file under new name, then copy over old
name" so that if anything went wrong, it would reboot with stale session
state instead of no session state. Since I usually have the same nine
windows open to the same directories, with the same screen locations and
other state, this would not even be noticed by me, as the
two-sessions-ago state would be the same as the previous-session state. :P

Of course, the same lazy bastards don't even record session state at all
from IE and other apps. Firefox of course has had session state
preservation (and it seems quite robust) since version 2.0, and most
modern Linux window managers can remember everything you had open and
where it was positioned since the 90s. :P