photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: ben on October 26, 2016, 01:05:25 PM

Title: Windows Error Msg when Renaming Folder
Post by: ben on October 26, 2016, 01:05:25 PM
Hi Mario,

when renaming folders in the "media & folder" view, it happens quite often that iMatch cannot rename it (2-4 out of ten occasions).
I then have to select another folder and then again the folder i want to rename and try again. Sometimes it helps, sometimes i have to repeat it a  second time.

Sorry, I didn't figure out so far when it happens exactly, maybe the following information can help.
- Logdata (debug mode) attached, but doesn't show errors
- Screenshot attached
- iMatch 5.7.2

Ben
Title: Re: Windows Error Msg when Renaming Folder
Post by: ben on October 26, 2016, 01:13:15 PM
Maybe a helpful UPDATE

I just tried to rename the following folder "05_Mai 16": -> only one underscore
I tried the following sequence from up to down...
Title: Re: Windows Error Msg when Renaming Folder
Post by: Mario on October 26, 2016, 01:40:31 PM
IMatch / Windows report a "file locked" error as it seems.
Do you have other applications running which may have the file locked?

Maybe the IMatch Viewer or Quick View Panel open?
Windows WIC / DirectX sometimes keep a file locked that was recently loaded, and if you rename a file that's currently displayed in the Quick View panel, this may be it.
Title: Re: Windows Error Msg when Renaming Folder
Post by: ben on October 26, 2016, 02:28:39 PM
- No other (at least foreground) applications are running.
- Viewer is closed
- Quickview is open -> docked

I closed the quickview and renaming worked again.
Though, it doesn't happen all the time, since i could rename folders with running quickview as well.
Title: Re: Windows Error Msg when Renaming Folder
Post by: Mario on October 26, 2016, 04:10:58 PM
I mentioned the QuickView because I noticed that sometimes DirectX/WIC keeps a file locked that was recently viewed.
IMatch releases all WIC "references" to the image file on disk once it is loaded, but there still seems to be some lock open. Maybe in WIC. Maybe in the WIC codec. It's a black box, really.
Title: Re: Windows Error Msg when Renaming Folder
Post by: ubacher on October 26, 2016, 05:59:02 PM
I just close and re-open Imatch when I run into this problem.
This proves  that the folder is locked by something inside IM.
Title: Re: Windows Error Msg when Renaming Folder
Post by: Mario on October 26, 2016, 06:25:55 PM
QuoteThis proves  that the folder is locked by something inside IM.

Your assumption is not necessarily correct and your way to solve it overly drastic.

IMatch uses external components, from Windows routines to access files to the WIC subsystem to WIC codecs.
Not to forget ExifTool and shell extensions used by Windows when IMatch requests thumbnails for certain file formats.
Closing the process takes long enough to release everything, including locks caused by temporary Windows resources.
Not everything is under my control.

IMatch loads images in advance in the background (in the Viewer and the Quick View Panel).
If you now happen to try to delete/rename/move one of these files within the few seconds it takes to pre-load them, WIC may still have them locked because it is reading them.
If you run into these problems often, try to hide or close the QuickView Panel while you try to delete or rename files that are currently displayed or are 'near' the currently selected file in the file window.
Title: Re: Windows Error Msg when Renaming Folder
Post by: ben on October 27, 2016, 07:54:01 AM
I understand,thanks for the technical insights

- how is this related to renaming folders, not files?

- yesterday,I tried for 10 minutes and gave up. That shouldn't be related to the preloader

- is this somehow related to my folder structure only?

- Problem known to anybody other than ubacher and me?
Title: Re: Windows Error Msg when Renaming Folder
Post by: Mario on October 27, 2016, 08:17:54 AM
I don't know.

IMatch logs the 16011 error code when the Windows SHFileOperation function returns FALSE as the result of a file or folder rename / move operation. This function has not really a more detailed error code so IMatch cannot tell why a folder or file rename has failed. Usually it's caused by file system permission issues or, more usually, some file being locked or open in another application, service, Windows Explorer etc.

If you can reproduce this you may be able to find out which file is the reason by using sysinternals process monitor. And this may provide a hint of whether or not the file is locked by IMatch and maybe also which part or component of IMatch is locking it.
Title: Re: Windows Error Msg when Renaming Folder
Post by: sinus on October 27, 2016, 09:16:09 AM
Quote from: ben on October 27, 2016, 07:54:01 AM
- Problem known to anybody other than ubacher and me?

Not for me.
I had this some times, but every time I had the folder somewhere open. Not IMatch-related in my case, in my case user-error.  8)
Title: Re: Windows Error Msg when Renaming Folder
Post by: ben on October 29, 2016, 11:19:23 AM
QuoteIf you can reproduce this you may be able to find out which file is the reason by using sysinternals process monitor.
Can you recommend a tool for this?
Title: Re: Windows Error Msg when Renaming Folder
Post by: Mario on October 29, 2016, 01:43:09 PM
As I wrote, sysinternals (Microsoft) process monitor.

https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx

This tool allows you to monitor processes on your system and see which file system operations they perform etc.

Warning: This is a tool for IT people, I'm afraid. It's not hard to use if you have some computer experience and there are numerous tutorials on the MS web site and also on the net.
Title: Re: Windows Error Msg when Renaming Folder
Post by: ben on October 31, 2016, 08:42:46 AM
Ok, i will try that tool the next time it happens.
Thanks for the hint.