bleachbit crashes windows explorer

Forums: 

In Windows 10 I run a bleachbit job each night for each user. Windows scheduler initiates a bat file with the user credentials.

My main user is always logged in on the machine. I access the machine through remote desktop on various android devices, sometimes a TV set, sometimes an android TV PC connected to a monitor. When finished I never log out, but disconnect the remote desktop session.

Sometimes when I connect, the desktop is blank. I must start task manager and run "explorer", which immediately recreates the desktop. It only takes a moment to restart windows explorer, but it is a nuisance.

For some time I've been trying to find out why windows explorer keeps closing. If my wife leaves her user logged in, her desktop will disappear, too. This happens reliably.

Last night I was up late when the desktop went away while I was using it. I restarted windows explorer, and after a few seconds it went away again. It then dawned on me, it might be the bleachbit job, and yes, the bleachbit jab was running when this happens.

There is something in bleachbit that causes windows explorer to crash, if the user is logged in, when bleachbit runs as a scheduled process from windows task manager.

I assume you are using BleachBit version 1.12?

The latest development releases of BleachBit include improvements for cleaning Windows Explorer. I am hoping to get a beta version out soon, but until then you can get the latest versions from http://ci.bleachbit.org .

---
Andrew, lead developer

I have a bat file that calls bleachbit repeatedly with all the commands I want. If I run that bat file, I notice the screen or desktop goes blank, then reappears. I had never noticed that before. I wasn't paying attention, I guess.

So, if the bat file runs as a scheduled process while the user is logged in, bleachbit is closing explorer for whatever user the thread is associated with at that time.

I will try the latest revision, but, if bleachbit is closing explorer, my problem will continue, because when bleachbit launches explorer again it will be in a different thread and output will go to an invisible, temporary console.

ROCKNROLLKID's picture

It is resetting your explorer.exe, which is where the black screen comes from. This is so it can clean thumbnails out properly and resolved an issue that was in 1.10. You can disabled Windows Explorer - Thumbnails rule to stop the black screen.

@Andrew: I think we should reconsider the other idea we had for this and just mark the files for deletion upon restart. Seems like some people get concerned over this.

____________________
Also known as Alex.

Moderator for BleachBit and a maintainer for Winapp2.

Check out my open-source group on Steam: http://steamcommunity.com/groups/opencommunity

Windows 10 x64 (switching to ReactOS in the future).

I did find this in documentation:
https://github.com/bleachbit/bleachbit/blob/master/cleaners/windows_expl...

My desktop has been going away a long time. I thought it was a windows issue and never thought of the bleachbit process. Glad this is resolved. Thank you for making Bleachbit!

GoodGuy98's picture

I was having this type of problem and saved this info for later reference. It may help in your case:

Running BleachBit-1.11.4-setup-English.exe with "Windows Explorer - Thumbnails"
checked causes Windows Explorer to restart.

Uncheck Windows Explorer - Thumbnails (if it was not already checked), and check
it again. There should be a warning. Then clean it. There should be no errors,
and Windows Explorer should restart. It should work on both 32-bit and 64-bit
versions of Microsoft Windows.

http://www.bleachbit.org/news/bleachbit-1114-beta

BleachBit 1.17 beta has a fix for cleaning thumbnails and its effect on Windows Explorer. Please test, and let me know how it goes

---
Andrew, lead developer

I tried version 1.17 beta. It still closes explorer when cleaning thumbnails. No difference.

subjectivist : BleachBit 1.17 still intentionally closes Windows Explorer to more thoroughly and quickly clean certain files. The differences since BleachBit 1.12 here are

1. When you check the Windows Explorer checkbox, you will get a warning

2. When BleachBit runs with administrator privileges and restarts Windows Explorer, it is careful to restart Windows Explorer with normal privileges

---
Andrew, lead developer

I have a scheduled task for each user that runs a bat file containing bleachbit commands. Each user runs the same bat file, but the bat file uses %userprofile% to write the log correctly for each. When the task runs it uses the user's credentials, so it doesn't matter whether the user is logged on.

I can open task scheduler and run manually. So I did that for the scheduled task associated with my user. In the bat file I included the thumbnail command. I fired it off and kept working. After a couple of minutes my desktop went blank and did not come back.

Maybe when bleachbit turns explorer back on, it turns it on pursuant to the thread it is running in, not the one I am working in.

I think just having a disclaimer present saying what the thumbnail function does is good enough. If run by invoking a bat file directly, it may not be an issue, but running as a scheduled task it will continue to be an issue.