Users and developers helping users with generic and technical Pale Moon issues on all operating systems.
Moderator:trava90
Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Short version: is it good practice to first close Pale Moon, Epyrus etc. before a shutdown/restart or even Sleep, to avoid potential corruption?
Long version: It's not uncommon for me to open PM and get asked if I want to restore the previous session, as if a crash had occurred. I then realise I hadn't closed PM before shutting the system down when this occurs. This indicates that Windows is not always waiting for processes to close gracefully. It just terminates them and that doesn't always work well with PM. I think this OS behaviour can be changed (i.e. make it wait more), but I believe quick (forced?) termination is the default.
I'll quote a fairly lengthy reply from ChatGPT below (can't say if it's accurate), but I'd rather hear from the experts. This is not really about unexpected power cuts, but standard system Shutdown and Sleep (Sleep/Wake sounds innocent enough, but I guess it has its own quirks). Thanks.
ChatGPT wrote:A Mozilla profile can be corrupted under the right conditions, particularly if the application is open when:
1. Forced Shutdown (Power Cut) – HIGH RISK
A sudden power cut can cause file corruption if the browser is writing data (bookmarks, settings, extensions, history) at the moment of shutdown.
Profile databases (like places.sqlite for history/bookmarks) are especially vulnerable.
If the OS has write caching enabled, incomplete writes may leave files in an inconsistent state.
In worst cases, the entire profile could become unusable (though often only certain files get corrupted).
Risk Level: HIGH (especially if the application is actively saving data).
2. Forced Termination (Windows Shutdown or "End Task") – MODERATE TO HIGH RISK
If Windows force-closes the application before it finishes writing data, it can corrupt profile files.
If Windows shuts down gracefully, it usually gives the program time to close properly. But sometimes, if an application is unresponsive, Windows forces termination without waiting.
Modern file systems (like NTFS) help minimize corruption, but databases like places.sqlite (bookmarks/history) or prefs.js (settings) may still get damaged.
Risk Level: MODERATE to HIGH, depending on what’s happening when termination occurs.
3. Sleep/Wake Operation – LOW TO MODERATE RISK
Normally, sleep mode does not cause corruption, because everything is simply paused in RAM.
However, on wake-up, some background tasks (e.g., writing session data, syncing bookmarks) may fail if the drive doesn’t wake up properly.
If the system has issues resuming from sleep (e.g., crashes or BSODs during wake-up), there’s a chance for profile corruption.
Hibernate (S4) is safer than Sleep (S3), but both are usually fine unless there are driver or power management issues.
Risk Level: LOW, unless something goes wrong during wake-up.
How to Minimize Profile Corruption Risks
🔹 Regularly back up your profile.
🔹 Disable Windows write caching for the drive to reduce risk from sudden power loss.
🔹 Use a UPS (uninterruptible power supply) if power cuts are common.
🔹 Close the application manually before shutdown/sleep if possible.
🔹 Use the places.sqlite integrity check (type about:support in Pale Moon’s address bar and look for database corruption warnings).
🔹 If profile corruption happens often, consider using a RAM disk for temporary files to avoid hard drive wear and corruption.
That long answer is mostly correct. You should close all open applications before restart or shut down. I'm not talking about background apps. Yes if windows doesn't want to wait for PM to close on it's own, it will force shut it down. Now sleep is something different. I don't know if your on a laptop or desktop. Most desktops if I remember correctly, doesn't even have a sleep option. The only problem with sleep is if your laptop is running on battery and you have hibernate disabled (as I do, cause it causes me all sorts of problems) if the battery dies then PM is force shut down. Personally once my laptop is asleep, I plug the power cord in.
Just for reference, the same happens on Linux though the heuristics behind the shutdown process can differ from system to system for a number of reason.
Basically, quit all programs you can quit before shutting down no matter which system you are on.
On Windows, applications have the opportunity to respond to WM_QUERYENDSESSION window message if they want to delay shutdown to gracefully finish what they were doing. If they let the system handle the message (and related subsequent message), then they will be terminated soon after receiving and processing WM_ENDSESSION the same way as if you ended their process in Task Manger.
Thanks. Can I assume then that Pale Moon does not respond to WM_QUERYENDSESSION, letting Windows handle it and thus occasionally (depending on various factors) terminating abruptly if left open?
Pale Moon responds to both WM_QUERYENDSESSION and WM_ENDSESSION, the latter of which does a fast shutdown after notifying internal components to shut down.
I've never had issues with Pale Moon shutting down in an unclean fashion as a result of a Windows shutdown or restart, so if that is what you consistently see, then you may want to investigate if some of your extensions might be preventing the application from closing.
"The world will not be destroyed by those who do evil, but by those who watch them without doing anything." - Albert Einstein
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
I too have never had any problems with Pale Moon shutting down causing a corrupted profile. But I really don't use sleep in Linux. I use "Suspend" which starts after 60 minutes of non use.
When I want to come out of Suspend, I tap my Power button on both of my desktop tower computers. Pale Moon then comes out of Suspend and I left click on File in the Menu Bar, scroll on down and tap on Quit and Pale Moon shuts down.
As for my extensions, I only use two. They are uBlock Origin 1.16.6.0 and Zoom Label (1.3). The lightweight theme I use is Past Modern Revisited (2.10.2).
Linux Mint 22.1 (Xia) Xfce w/Pale Moon, Waterfox, Firefox
MX Linux 23.6 (Libretto) Xfce w/Pale Moon, Waterfox, Firefox
Linux Debian 12.10 (Bookworm) Xfce w/Pale Moon, Waterfox, Firefox
I use "Suspend" which starts after 60 minutes of non use.
When I want to come out of Suspend, I tap my Power button on both of my desktop tower computers.
"Sleep" is another term for "suspend". It keeps the system in a "powered on" state, but processing is suspended for the duration to use very low power.
"The world will not be destroyed by those who do evil, but by those who watch them without doing anything." - Albert Einstein
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Other than running subsets with/without them active, and seeing when this occurs and doesn't occur, I don't know of any faster way.
Of course it may also depend on which sites had been open in your session, further complicating matters.
The advice to just manually close Pale Moon before restart or shutdown (and giving it a minute before system shutdown) might be a more practical solution.
"The world will not be destroyed by those who do evil, but by those who watch them without doing anything." - Albert Einstein
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Ok, I thought some evidence might appear in the Developers Tools somewhere, but perhaps that information doesn't survive browser restarts anyway (graceful or otherwise).
By definition it's not possible. If a process is killed, it can't do anything anymore. No file writes, no processing. At most, a heavily-logging build might record up to which point the shutdown process was completed, but that would really be disproportionate work to put in for something very uncommon to occur.
"The world will not be destroyed by those who do evil, but by those who watch them without doing anything." - Albert Einstein
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite