Avast lock file message

Bug #1534820 reported by ineuw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BleachBit
Fix Released
Medium
Andrew Ziem

Bug Description

In both versions 1.094 and 1.10 The following message is reported as an error.

"Error in execution of Command to delete C:\Windows\temp\_avast_\AvastLock.txt"

System Information
-----------------------------
BleachBit version 1.10
GTK version 2.16.6
local_cleaners_dir = C:\Program Files\cleaners
locale_dir = C:\Program Files\BleachBit\share\locale\
options_dir = C:\Users\ineuw\AppData\Roaming\BleachBit
personal_cleaners_dir = C:\Users\ineuw\AppData\Roaming\BleachBit\cleaners
system_cleaners_dir = C:\Program Files\BleachBit\share\cleaners\
locale.getdefaultlocale = ('en_US', 'cp1252')
os.getenv('APPDATA') = C:\Users\ineuw\AppData\Roaming
os.getenv('LocalAppData') = C:\Users\ineuw\AppData\Local
os.getenv('LocalAppDataLow') = C:\Users\ineuw\AppData\LocalLow
os.getenv('Music') = C:\Users\ineuw\Music
os.getenv('USERPROFILE') = C:\Users\ineuw
os.getenv('ProgramFiles') = C:\Program Files
os.getenv('ProgramW6432') = None
os.getenv('TMP') = C:\Users\ineuw\AppData\Local\Temp
os.path.expanduser('~') = C:\Users\ineuw
platform.win32_ver[1]() = 6.1.7601
platform.platform = Windows-Vista-6.1.7601-SP1
platform.version = 6.1.7601
sys.argv = ['C:\\Program Files\\BleachBit\\bleachbit.exe']
sys.executable = C:\Program Files\BleachBit\bleachbit.exe
sys.version = 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
win32com.shell.shell.IsUserAnAdmin() = True
__file__ = C:\Program Files\BleachBit\library.zip\bleachbit\Diagnostic.pyo

Revision history for this message
Andrew Ziem (ahziem1) wrote :

I confirmed this happens with Avast on Windows 7 with BleachBit 1.10, and I will check into more

Changed in bleachbit:
milestone: none → 1.12
status: New → Confirmed
Revision history for this message
ROCKNROLLKID (slinger1410-deactivatedaccount) wrote :

When you go to that location, is there such a file that exists there? If so, when you delete the file, does the error simply go away?

Revision history for this message
ROCKNROLLKID (slinger1410-deactivatedaccount) wrote :

My bad, what I meant to say is if the file does exist there, please try manually deleting it and see if the error simply goes away.

Revision history for this message
Andrew Ziem (ahziem1) wrote :

Error in execution of Command to delete C:\Windows\temp\_avast_\AvastLock.txt
Traceback (most recent call last):
  File "\bleachbit\bleachbit\Worker.py", line 84, in execute
    for ret in cmd.execute(self.really_delete):
  File "\bleachbit\bleachbit\Command.py", line 89, in execute
    Windows.delete_locked_file(self.path)
  File "\bleachbit\bleachbit\Windows.py", line 145, in delete_locked_file
    pathname, None, win32con.MOVEFILE_DELAY_UNTIL_REBOOT)
error: (5, 'MoveFileEx', 'Access is denied.')

Revision history for this message
Andrew Ziem (ahziem1) wrote :

I confirmed the error happens with BleachBit 1.10 with Avast when Bleachbit is running in admin mode, and the file cannot be deleted normally:

del C:\Windows\Temp\_avast_\AvastLock.txt
The process cannot access the file because it is being used by another process.

Changed in bleachbit:
importance: Undecided → Medium
Revision history for this message
Andrew Ziem (ahziem1) wrote :

Potential fix committed in da7db85. When the beta version comes out, please test. Thank you for the report

Changed in bleachbit:
status: Confirmed → Fix Committed
Revision history for this message
ineuw (ineuw) wrote :

Thanks for letting me know. Will patiently wait for the new release. It's not as if the fate of Western civilization depends on it, but who knows? :-)

Revision history for this message
Andrew Ziem (ahziem1) wrote :

To confirm the fix, please test the fix in BleachBit 1.11 beta
https://www.bleachbit.org/news/bleachbit-1110-beta

Changed in bleachbit:
status: Fix Committed → Fix Released
Revision history for this message
ineuw (ineuw) wrote :

This version does not eliminate: Error in execution of Command to delete C:\Windows\temp\_avast_\AvastLock.txt

BleachBit version 1.11
GTK version 2.16.6
local_cleaners_dir = C:\Program Files\cleaners
locale_dir = C:\Program Files\BleachBit\share\locale\
options_dir = C:\Users\ineuw\AppData\Roaming\BleachBit
personal_cleaners_dir = C:\Users\ineuw\AppData\Roaming\BleachBit\cleaners
system_cleaners_dir = C:\Program Files\BleachBit\share\cleaners\
locale.getdefaultlocale = ('en_US', 'cp1252')
os.getenv('APPDATA') = C:\Users\ineuw\AppData\Roaming
os.getenv('LocalAppData') = C:\Users\ineuw\AppData\Local
os.getenv('LocalAppDataLow') = C:\Users\ineuw\AppData\LocalLow
os.getenv('Music') = C:\Users\ineuw\Music
os.getenv('USERPROFILE') = C:\Users\ineuw
os.getenv('ProgramFiles') = C:\Program Files
os.getenv('ProgramW6432') = None
os.getenv('TMP') = C:\Users\ineuw\AppData\Local\Temp
os.path.expanduser('~') = C:\Users\ineuw
platform.win32_ver[1]() = 6.1.7601
platform.platform = Windows-Vista-6.1.7601-SP1
platform.version = 6.1.7601
sys.argv = ['C:\\Program Files\\BleachBit\\BleachBit.exe']
sys.executable = C:\Program Files\BleachBit\BleachBit.exe
sys.version = 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
win32com.shell.shell.IsUserAnAdmin() = True
__file__ = C:\Program Files\BleachBit\library.zip\bleachbit\Diagnostic.pyo

Andrew Ziem (ahziem1)
Changed in bleachbit:
status: Fix Released → In Progress
assignee: nobody → Andrew Ziem (ahziem1)
Revision history for this message
ROCKNROLLKID (slinger1410-deactivatedaccount) wrote :

This is coming from BleachBit's Temporary file cleaner. A quick and simple solution might be to just create a exclude for that file in CleanerML, instead of creating a silent error message.

Revision history for this message
ineuw (ineuw) wrote :

It's a good idea ROCKNROLLKID, except where and what is the CleanerML?

Revision history for this message
ROCKNROLLKID (slinger1410-deactivatedaccount) wrote :

Sorry. That comment was directed to Andrew.

However, I just noticed that the issue is because the file cannot access it because it is being used by another process, meaning it can still be removed when the file is inactive. So perhaps making a silent error message might be the better approach.

It is up to Andrew of what he wants to do, though.

Revision history for this message
ineuw (ineuw) wrote :

Why not just skip over open files of this sort? You know what Avast is.

Revision history for this message
Andrew Ziem (ahziem1) wrote :

I confirmed the error still exists with BleachBit 1.11 and Windows 7.

Skipping over the file (i.e., trying not to delete it or whitelisting it) is not ideal because it hard codes a specific path that may change. I am looking into making this a silent error because there two ways to delete the file do not work, and the file does not need to be deleted anyway.

Revision history for this message
Andrew Ziem (ahziem1) wrote :

I fixed this in commit a00c2b4 and tested with Windows 7 and Avast. Next I will work on releasing an installer for testing.

Changed in bleachbit:
status: In Progress → Fix Committed
Revision history for this message
ineuw (ineuw) wrote : Re: [Bug 1534820] Re: Avast lock file message
Download full text (3.7 KiB)

I no longer have this problem using Windows 7 32bit. So, I must assume that
this error exists for others because of their Avast settings. My use of
Avast is restricted to system and email protection.

BleachBit version 1.11
GTK version 2.16.6
local_cleaners_dir = C:\Program Files\cleaners
locale_dir = C:\Program Files\BleachBit\share\locale\
options_dir = C:\Users\ineuw\AppData\Roaming\BleachBit
personal_cleaners_dir = C:\Users\ineuw\AppData\Roaming\BleachBit\cleaners
system_cleaners_dir = C:\Program Files\BleachBit\share\cleaners\
locale.getdefaultlocale = ('en_US', 'cp1252')
os.getenv('APPDATA') = C:\Users\ineuw\AppData\Roaming
os.getenv('LocalAppData') = C:\Users\ineuw\AppData\Local
os.getenv('LocalAppDataLow') = C:\Users\ineuw\AppData\LocalLow
os.getenv('Music') = C:\Users\ineuw\Music
os.getenv('USERPROFILE') = C:\Users\ineuw
os.getenv('ProgramFiles') = C:\Program Files
os.getenv('ProgramW6432') = None
os.getenv('TMP') = C:\Users\ineuw\AppData\Local\Temp
os.path.expanduser('~') = C:\Users\ineuw
platform.win32_ver[1]() = 6.1.7601
platform.platform = Windows-Vista-6.1.7601-SP1
platform.version = 6.1.7601
sys.argv = ['C:\\Program Files\\BleachBit\\bleachbit.exe']
sys.executable = C:\Program Files\BleachBit\bleachbit.exe
sys.version = 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)]
win32com.shell.shell.IsUserAnAdmin() = True
__file__ = C:\Program Files\BleachBit\library.zip\bleachbit\Diagnostic.pyo

On Fri, May 27, 2016 at 5:47 PM, Andrew Ziem <email address hidden> wrote:

> I confirmed the error still exists with BleachBit 1.11 and Windows 7.
>
> Skipping over the file (i.e., trying not to delete it or whitelisting
> it) is not ideal because it hard codes a specific path that may change.
> I am looking into making this a silent error because there two ways to
> delete the file do not work, and the file does not need to be deleted
> anyway.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1534820
>
> Title:
> Avast lock file message
>
> Status in BleachBit:
> In Progress
>
> Bug description:
> In both versions 1.094 and 1.10 The following message is reported as
> an error.
>
> "Error in execution of Command to delete
> C:\Windows\temp\_avast_\AvastLock.txt"
>
> System Information
> -----------------------------
> BleachBit version 1.10
> GTK version 2.16.6
> local_cleaners_dir = C:\Program Files\cleaners
> locale_dir = C:\Program Files\BleachBit\share\locale\
> options_dir = C:\Users\ineuw\AppData\Roaming\BleachBit
> personal_cleaners_dir = C:\Users\ineuw\AppData\Roaming\BleachBit\cleaners
> system_cleaners_dir = C:\Program Files\BleachBit\share\cleaners\
> locale.getdefaultlocale = ('en_US', 'cp1252')
> os.getenv('APPDATA') = C:\Users\ineuw\AppData\Roaming
> os.getenv('LocalAppData') = C:\Users\ineuw\AppData\Local
> os.getenv('LocalAppDataLow') = C:\Users\ineuw\AppData\LocalLow
> os.getenv('Music') = C:\Users\ineuw\Music
> os.getenv('USERPROFILE') = C:\Users\ineuw
> os.getenv('ProgramFiles') = C:\Program Files
> os.getenv('ProgramW6432') = None
> os.getenv('TMP') = C:\Users\ineuw\AppData\Local\Temp
>...

Read more...

Revision history for this message
Andrew Ziem (ahziem1) wrote :

Would you please test the latest release BleachBit version 1.11.2 beta? Let me know how it goes.
https://www.bleachbit.org/news/bleachbit-1112-beta

Changed in bleachbit:
status: Fix Committed → Fix Released
Revision history for this message
ineuw (ineuw) wrote :

1.11.2 works fine, no errors.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.