thomasloupe / CleanSweep

The easiest and quickest Windows junk file remover on the planet.
58 stars 3 forks source link

Unable to Access data_0 #9

Closed brw001 closed 1 year ago

brw001 commented 1 year ago

When I run Cleansweep2 it always comes up with an "Unhandled Exception" "Access to the path 'data_0' is denied" and providing "Continue" or "Quit" options. I always click Continue and it finishes up. Is there any way to prevent this dialog from appearing? I could find no way to tell it not to attempt accessing data_0 files so I don't constantly have to click on a choice.

brw001 commented 1 year ago

Cleansweep data_0 Error

thomasloupe commented 1 year ago

Hey there @brw001, could you please expand the details section of that error and send it along? Also, it would be very helpful if you could provide which step of the cleaning process you see this on. You may need to uncheck/check one by one to find the culprit, but it would help greatly.

On first glance, it's clear we're getting an error because either a folder is in use and we can't access it, or we don't have permission to view what's inside the folder, let alone delete it or its contents. CleanSweep is letting you know it ran into an error doing one of these things. I can certainly clean up the ugly error message popup, but we have to know which part of the application is raising it.

Thanks for the report!

brw001 commented 1 year ago

Hi Tom,

Sorry I didn’t get back sooner. I only use Cleansweep2 once a week after doing a full system backup using Veritas System Recovery to a local USB drive. I also do daily data backups using a different program, also to a local USB drive. Cleansweep always comes back with the identical error when I run after doing the full system backup. I also tried doing it after one of the daily backups and CleanSweep2 didn’t issue any errors. Note that when I click “Continue” it actually ends so I guess the error occurred right at the end of the process. This is the best I can provide since I just don’t have the time to try Cleansweep by eliminating all options & trying them one by one.

Attached is a Word document with a screenshot of the Cleansweep message as well as the full text of the details below that I copied from the unexpandable error window.

Just a suggestion: might want to create a pop-up when it’s finished running to indicate it’s actually done since the current interface doesn’t seem to make that clear.

Hope this helps!

@brw001

From: Thomas Loupe @.> Sent: Thursday, December 1, 2022 6:47 PM To: thomasloupe/CleanSweep2 @.> Cc: brw001 @.>; Mention @.> Subject: Re: [thomasloupe/CleanSweep2] Unable to Access data_0 (Issue #9)

Hey there @brw001 https://github.com/brw001 , could you please expand the details section of that error and send it along? Also, it would be very helpful if you could provide which step of the cleaning process you see this on. You may need to uncheck/check one by one to find the culprit, but it would help greatly.

On first glance, it's clear we're getting an error because either a folder is in use and we can't access it, or we don't have permission to view what's inside the folder, let alone delete it or its contents. CleanSweep is letting you know it ran into an error doing one of these things. I can certainly clean up the ugly error message popup, but we have to know which part of the application is raising it.

Thanks for the report!

— Reply to this email directly, view it on GitHub https://github.com/thomasloupe/CleanSweep2/issues/9#issuecomment-1334587771 , or unsubscribe https://github.com/notifications/unsubscribe-auth/APLE5SB6FZH7B4Q2ULBUNZTWLE2I7ANCNFSM6AAAAAASRF6L3Y . You are receiving this because you were mentioned. https://github.com/notifications/beacon/APLE5SBRZLNLDAHGQLJ5QRLWLE2I7A5CNFSM6AAAAAASRF6L32WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSPRQYXW.gif Message ID: @. @.> >

brw001 commented 1 year ago

OOPS, clicked Send before adding attachment! Included here.

From: Bruce Weiskopf @.> Sent: Sunday, December 11, 2022 2:02 PM To: 'thomasloupe/CleanSweep2' @.> Subject: RE: [thomasloupe/CleanSweep2] Unable to Access data_0 (Issue #9)

Hi Tom,

Sorry I didn’t get back sooner. I only use Cleansweep2 once a week after doing a full system backup using Veritas System Recovery to a local USB drive. I also do daily data backups using a different program, also to a local USB drive. Cleansweep always comes back with the identical error when I run after doing the full system backup. I also tried doing it after one of the daily backups and CleanSweep2 didn’t issue any errors. Note that when I click “Continue” it actually ends so I guess the error occurred right at the end of the process. This is the best I can provide since I just don’t have the time to try Cleansweep by eliminating all options & trying them one by one.

Attached is a Word document with a screenshot of the Cleansweep message as well as the full text of the details below that I copied from the unexpandable error window.

Just a suggestion: might want to create a pop-up when it’s finished running to indicate it’s actually done since the current interface doesn’t seem to make that clear.

Hope this helps!

@brw001

From: Thomas Loupe @. @.> > Sent: Thursday, December 1, 2022 6:47 PM To: thomasloupe/CleanSweep2 @. @.> > Cc: brw001 @. @.> >; Mention @. @.> > Subject: Re: [thomasloupe/CleanSweep2] Unable to Access data_0 (Issue #9)

Hey there @brw001 https://github.com/brw001 , could you please expand the details section of that error and send it along? Also, it would be very helpful if you could provide which step of the cleaning process you see this on. You may need to uncheck/check one by one to find the culprit, but it would help greatly.

On first glance, it's clear we're getting an error because either a folder is in use and we can't access it, or we don't have permission to view what's inside the folder, let alone delete it or its contents. CleanSweep is letting you know it ran into an error doing one of these things. I can certainly clean up the ugly error message popup, but we have to know which part of the application is raising it.

Thanks for the report!

— Reply to this email directly, view it on GitHub https://github.com/thomasloupe/CleanSweep2/issues/9#issuecomment-1334587771 , or unsubscribe https://github.com/notifications/unsubscribe-auth/APLE5SB6FZH7B4Q2ULBUNZTWLE2I7ANCNFSM6AAAAAASRF6L3Y . You are receiving this because you were mentioned. https://github.com/notifications/beacon/APLE5SBRZLNLDAHGQLJ5QRLWLE2I7A5CNFSM6AAAAAASRF6L32WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSPRQYXW.gif Message ID: @. @.> >

thomasloupe commented 1 year ago

Hi @brw001,

It doesn't seem that the file attached in your latest comment. You might need to convert it to a regular text file and try again.

Thanks!

brw001 commented 1 year ago

I think you missed my follow-up “OOPS” response where I indicated I’d forgotten to add the attachment which I added (scroll down through the . It’s a standard Microsoft Word Docx file. Shouldn’t be a problem. I’ve attached it again here. I also just realized maybe that doesn’t work with Github so I went directly to the conversation and added a comment with attachment. When I look at it online it seems to be ok. I hardly ever use Github and it’s kind of unintuitive!

From: Thomas Loupe @.> Sent: Monday, December 12, 2022 7:15 PM To: thomasloupe/CleanSweep2 @.> Cc: brw001 @.>; Mention @.> Subject: Re: [thomasloupe/CleanSweep2] Unable to Access data_0 (Issue #9)

Hi @brw001 https://github.com/brw001 ,

It doesn't seem that the file attached in your latest comment. You might need to convert it to a regular text file and try again.

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/thomasloupe/CleanSweep2/issues/9#issuecomment-1347560590 , or unsubscribe https://github.com/notifications/unsubscribe-auth/APLE5SBW6MV6OA4ANOPNRC3WM65ZBANCNFSM6AAAAAASRF6L3Y . You are receiving this because you were mentioned. https://github.com/notifications/beacon/APLE5SHRLR3XYWL3IOZPPB3WM65ZBA5CNFSM6AAAAAASRF6L32WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSQKISI4.gif Message ID: @. @.> >

brw001 commented 1 year ago

CleanSweep Error Details.docx

brw001 commented 1 year ago

You never got back to me after I figured out how to provide the .docx (see above). I'm an IT professional and know how to navigate most sites but have to admit this one is confusing. But I think I provided what you requested just above ("CleanSweep Error Details.docx"). I'm still curious re. my questions. I can't make head or tails out of "Close with comment" vs. "Close as not planned" which seem to be the only 2 choices below. I'm just hoping you'll somehow see this and respond because I think my issue is important! Thanks, Bruce

thomasloupe commented 1 year ago

Hey @brw001,

You're correct, I've got the attachment.

Some clarity on issues: "Closing" anything on Github essentially means the issue is either no longer relevant or is resolved. For any interactions, you'll just want to use "Comment". Closing with a comment is just easier to use if you want to send a message and immediately close the issue. Closing as not planned just means there is some reason (IE: the issue is old and stale, can't reproduce, etc).

As for the issue, what would be most helpful is finding where exactly the folder named data_0 is located. If you're able to install something like "Everything" to search for the folder location, we can pin down which part of the app is trying to delete the folder.

If we can't pin it down, I basically have to wrap try/except blocks around everything and expect an "access denied" error for every one of them. The difference being minutes to possibly days in coding time. On the backend, I'll see if I can search around and find the typical location of the folder; right now my best guess is somewhere in temp or a Windows install folder.

brw001 commented 1 year ago

Hi Tom, I've been using "Everything" for years, couldn't manage without it! Another excellent product is "Lookeen" that indexes everything on the computer where it's installed as well as attached devices (e.g., NAS storage). It's an Outlook add-on but can also be installed outside of Outlook (I've never tried it that way since I have Outlook open all the time). It's VERY fast (infinitely better than MS searching). The first thing I did when I saw the "data_0" error in Cleansweep2 is search through both products and nothing came up except the error message from Cleansweep2 (Lookeen).

My first reaction when I saw this was the same as yours -- that it must have been a temp of some kind that was still in place when starting Cleansweep2 but got removed during the process. I'm not really concerned about the detail since there's no indication of a problem on the computer. Also, it ONLY happens when I run Cleansweep2 after doing a full system backup (which is the only time I use Cleansweep2 -- I only tested in some other situations to see if I could figure out what was going on.

One other thing: the error always pops up toward the end of the Cleansweep2 process and when I click Continue nothing more happens except that the message disappears. So doesn't seem that there was anything to "Continue". My only issue is having to do the extra "Continue" click to finish up (no big deal).

Also a suggestion: since when starting Cleansweep2 it indicates the amount of space that might be restored it would be helpful if it indicated how much it actually did restore when it finishes. My workaround for that is simply to close Cleansweep2 and then start it all over again to see the initial message, then just close it.

brw001 commented 1 year ago

Hi Tom,

When I installed the latest Win10 updates on 12/31/22 and ran Cleansweep2 afterwards as I do every month the "data_0" _error did NOT come up! Plus it showed me how much disk space was restored at the end which it never did before, which is why I had suggested in my previous comment above that it show that. Seems the program does show it when it doesn't encounter the error.

Will let you know if the problem recurs. Happy New Year!

thomasloupe commented 1 year ago

Thanks for the update @brw001, and I'm really glad to hear it's resolved itself. This is definitely still something I want to look into on the backend, but no worries, we don't need to keep the issue open for that. I'm going to add some additional error handling that should help with this issue, and others where we can't access certain folders or files. I'll just need to do it for most of the operations. Some of them already have it, but there are more that can benefit from it.

Have a great new year!

brw001 commented 1 year ago

Hi Tom. The problem is "data_0" was fine for a few times but has returned! I can think of nothing I've done that would have caused it. Also, note that when it had stopped the programs indicated the amount of data saved, but now that it's back I no longer see that result. Is there any way you can still get it to show the amount of data saved even if the error re. "data_0" recurs. Also it occurs to me that "data_0" may have something to do with that saved value? Thanks.

thomasloupe commented 1 year ago

Hi @brw001,

So something is clearly using the folder. Can you locate the folder for me by chance? If you can get me the location I can just patch it and fix it for good.

brw001 commented 1 year ago

I just ran an Everything program scan and found "data_0" folders all over the place all my computers. So I researched it and discovered it's part of caching by Chrome and apparently lots of other programs. Here's just one example referring to Chrome cache: https://stackoverflow.com/questions/47895700/reading-chrome-cache-data-c-sharp/47896411#47896411 If you scroll down in the link you'll see: "in the cache folder, larger files are stored individually as f_xxxxx, while smaller files are combined as data_0, data_1, etc." You'll find many others in stackoverflow.com and elsewhere. All of the data_x folders on my computers contain binary files. One of the data_0 folders is in my Recent folder. It's apparently pretty complicated and likely not a good a idea to remove any of these unless maybe the ones in temporary folders. I tried researching further but much of the technical results are beyond my knowledge. You might want to look into it further. All I really care about is being able to see the amount of disk space retrieved at the end of the Cleansweep run, which apparently it can't do once it encounters a particular "data_0" that somehow disappeared during the process.

thomasloupe commented 1 year ago

When we hit the data_0 access denied issue, anything after the Chrome cache cleanup failure is also not being cleaned appropriately, which explains perfectly why you're not seeing results at the end.

The solution here is to try and except the access error and just continue on like nothing happened now that we know it's in Chrome's cache. This has helped me narrow it down and I can get a fix in today which should just ignore file/folder access issues.

brw001 commented 1 year ago

Hi Tom, Keep in mind the data_0, data_1, etc. files are NOT just in Chrome. E.g., I have them for Edge, Spotify, Zinio, Logitech Capture, etc. When I run Everything program it shows 70 data_0 files! Also now this makes me wonder if by just relying on Cleansweep I should also go back to using Microsoft's cleanup. What do you think?

brw001 commented 1 year ago

P.S.: I should have said "folders", not "files". data_0, etc. are folders.

thomasloupe commented 1 year ago

@brw001 Tracking! So the easiest way to pin it down is to run CleanSweep2 with the Edge cache unchecked and see if the exception occurs. Then once again with the Chrome cache unchecked and see if the exception occurs.

There is exception handling in place currently for Chrome, but it didn't cover all exceptions. I have fixed this. There was very little exception handling for Edge, which is where I think the error actually happened. It now matches Chrome's and contains extra exception handling.

This release should fix the issue. Please let me know if it doesn't. https://github.com/thomasloupe/CleanSweep2/releases/tag/v2.3.5

brw001 commented 1 year ago

What about the other data_0 locations I mentioned including Spotify, Zinio, Logitech Capture (there are also more -- just didn't want to list them all)? Am wondering if there's some way to do it with a wildcard wherever it exists?

thomasloupe commented 1 year ago

Those are not relevant because CleanSweep doesn't clean those apps, so we should be good.

brw001 commented 1 year ago

When I download and unzip my Norton 360 automatically removed the .exe file. Attached is the message that came up. I'm guessing it's simply because it's so brand new but perhaps you need to do something to make it acceptable. I could tell it to restore but I want to be 100% certain there are no issues. Is there any way you can scan it and put it up again? Here's the rejection popup. Norton 360 Rejection

thomasloupe commented 1 year ago

See: https://www.nsoftware.com/kb/xml/11011701.rst It's not a threat, it's just a new file that Norton doesn't have reputation on. The exe has already been submitted to Windows Malware team and was signed and excluded from Defender many builds ago.

I don't have any plans on submitting it to third-party companies like McAfee or Norton, though users are welcomed to submit it for testing for peace of mind. The source code, as always, is freely available as well.

You can always mull through the file diffs to see the changes made as well between builds as well to see full code changes: https://github.com/thomasloupe/CleanSweep2/compare/v2.3.4...v2.3.5

brw001 commented 1 year ago

Hi Tom. I updated and ran it. So far no problem, but will have to wait & see if it pops up since prior build also went a while without issue but then happened again. Question: I don't see any way to check setting and tell it to save. Instead it just memorizes the last ones I used. For experimentation it would be useful to be able to set "default" check settings that could easily be restored without having to memorize how it was done before.

thomasloupe commented 1 year ago

Alright, well that seems to be good news so far. Let's leave this issue open for a week with your regular testing and see how it goes before closing off the issue for good.

Thanks for the recommendation. I have some plans to eventually re-write CleanSweep2 to be a bit more modular in terms of code - breaking things up into smaller tasks where individual operations might fail but don't lead to issues with other things failing as well. Right now, all the code is a long, single function with all the operations inside. Instead, these will be bound to multi-threaded tasks, which will operate individually of each other, have their own fail-safes, and will be much more clean and performant. I will add it to the list of suggestions to implement during the re-design coming soon.

brw001 commented 1 year ago

Hi Tom, I've now run it several times and so far the issue hasn't recurred! So let's close the issue for now. Thanks.