Page 1 of 3

TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-17, 18:43 UTC
by Mr.Scully
I've had this issue with probably all recent versions of TC (for several years for sure) and on multiple computers so I thought I'd finally ask.

When I open a Canon RAW photo (.CR2 or .CR3) - and it makes no difference which image viewer I use (for example the default viewer in Windows 11 or mostly I use FastStone MaxView) - Total Commander is then unable to delete or move the file for a couple minutes (copying works fine). When I try to delete the file it freezes at 0% and after ~5 minutes it crashes and the file is not deleted anyway.

If I use File Explorer instead of Total Commander it deletes the file immediately without problems.

For years I've always had to wait a couple of minutes after browsing the images before I was able to delete or move those files. Usually about five minutes were enough. After years I've finally decided to ask where the issue might be :)

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-17, 20:12 UTC
by Hacker
Hello and welcome Mr.Scully,
You can use a tool such as LockHunter to check which program is locking a file, thus preventing its deletion.

HTH
Roman

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-17, 20:26 UTC
by Mr.Scully
There are two processes locking the file - Total Commander and dllhost.exe. Does it help?

I can imagine something locks the file, I'm just curious why File Explorer can delete it without problems while Total Commander freezes for minutes...

It's happening only with Canon RAW image files, with no other type of files.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 08:51 UTC
by ghisler(Author)
Not confirmed. I tried with Irfanview and the Photos app.

Do you use thumbnails view? Or custom columns?

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 09:08 UTC
by Mr.Scully
No, I use a default configuration of TC + the EXIF plugin that I use only for mass renaming of files.

The issue may be limited to my computer but I've reinstalled the computer several times (because of a faulty harddrive) and I've always had this issue - on Windows 10 with an older version of TC but also on Windows 11 with TC 10.50.

I'm having the problem with RAW files from Canon R5/R6/5D mark IV. For some reason I do not have the problem with files from Canon 1DX or older cameras. Almost as if it was related to the resolution or file size or RAW file version or something...

(I have just removed the EXIF plugin but that didn't help).

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 09:55 UTC
by petermad
2Mr.Scully
I downloaded a sample .cr2 file from the Internet, but had no problems deleting the file even while it was still open in the various viewers I tested with.

Could you maybe provide a file that we could test with?

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 10:03 UTC
by Mr.Scully
It's happening to me with basically every file (at least from my cameras), for example:
https://www.uschovna.cz/en/zasilka/BKK4W245RBIMT7VZ-YNM/

When I open it in FastStone MaxView or Windows Photos and then attempt to delete it in the next minute or so, TC freezes and crashes.

As I said I can imagine it's happening only to me but I'd love to know why. At first I blamed FastStone MaxView but it's happening with the Windows default viewer too and only in Total Commander. The File Explorer in Windows deletes the file without problems so it's obviously related to TC - but it doesn't seem to be happening to you guys so... Any advices or tips welcome, I'm a photographer and I work with photos on daily basis so it's pain in the a** if I have to wait minutes before I can move or delete files :-)

I think I've had these problems for the past 3-4 years and probably only with photos from recent cameras, not the older models.

edit: I did the same test on a SSD, standard HDD and a NAS server. On the first two drives TC freezes. On the NAS server (via a network connection) TC says "Access to file denied". The two processes that locked the file are TC and dllhost.exe. So is it related to dllhost.exe - and how do I solve it? It seems to be a standard Windows process that handles launching other apps and processes.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 10:30 UTC
by petermad
2Mr.Scully
I tried your file https://www.uschovna.cz/en/zasilka/BKK4W245RBIMT7VZ-YNM/ - still no problem deleting the file, even when it is still shown in the viewer.

Tested with 32bit and 64bit TC 10.51rc2 under Windows 7 and 10 using various viewers that supports .cr3 files. (Windows Photos app is one of them under Windows 10)

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 10:32 UTC
by white
Mr.Scully wrote: 2022-08-18, 10:03 UTC It's happening to me with basically every file (at least from my cameras), for example:
https://www.uschovna.cz/en/zasilka/BKK4W245RBIMT7VZ-YNM/

When I open it in FastStone MaxView or Windows Photos and then attempt to delete it in the next minute or so, TC freezes and crashes.
Windows Photos cannot show this file, it needs RAW Image Extension. Perhaps your installed RAW Image extension is the culprit.

I had no problem deleting the file while it was open in Photos.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 10:55 UTC
by petermad
Under Window 10 I have Raw Image Extension version 2.0.32061.0 installed

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 11:02 UTC
by Mr.Scully
Yes, I installed the RAW extension for the Windows Photo Viewer but that was just for testing whether it's an issue related to my standard viewer (FastStone MaxView) or not. Obviously it's not related, it doesn't matter in which viewer I open the image, TC can't delete it afterwards anyway.

Could it be the Windows process dllhost.exe locking the file... which does not prevent File Explorer from deleting it but does prevent TC from doing that? It's a standard Windows process, I don't think it could be disabled.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 11:19 UTC
by white
2Mr.Scully
Are you using Thumbnail view in TC?
You said you use default configuration of TC + the EXIF plugin and tried with EXIF plugin removed. Have you tried to start TC with a new ini file?

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 11:27 UTC
by Mr.Scully
I deleted the INI file and relaunched TC but got the same freezing result (except that all the settings are now reset, of course). So it's not related to the configuration or version of TC.

https://www.queenconcerts.com/tmp/tc.jpg

No, I'm not using any Thumbnail View or vieweing pics using F3 or anything else. I basically use the default setting of TC with just minor changes such as font/size etc.

I'm not an IT novice so should you have any suggestion I'm ready to try it, no matter if it means disabling a process, editing some registry entries or whatever else. I've been having this issue for way too long :-D

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 13:00 UTC
by Horst.Epp
No problem here to delete Mr.Scully's example file.
It was open in TC Explorer preview (Raw Camera extensions are installed)
or with the IrfanView plugin while deleting.

Re: TC won't delete a Canon RAW file if it was opened recently

Posted: 2022-08-18, 13:03 UTC
by white
Mr.Scully wrote: 2022-08-18, 11:27 UTC No, I'm not using any Thumbnail View or vieweing pics using F3 or anything else.
But when does it happen? Only if you double click the file in TC or right click the file in TC and choose Open with?
Mr.Scully wrote: 2022-08-18, 11:27 UTC I'm not an IT novice so should you have any suggestion I'm ready to try it, no matter if it means disabling a process, editing some registry entries or whatever else.
Do you use Windows recycle bin? What happens if you use Shift+Del or disable recycle bin?
What happens if you enable "Use Explorer delete method"?