Windows Error Msg when Renaming Folder

Started by ben, October 26, 2016, 01:05:25 PM

Previous topic - Next topic

ben

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

ben

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...

  • "051_Mai 16"   -> ok
  • "051_Mai 1"     -> error
  • "05_Mai 16"     -> ok
  • "05_Mai 1"       -> error
  • "05_Mai 161"   -> ok
  • "05_Mai 16"     -> ok
  • "05_Mai 1"       -> ok -> didn't work before
  • "05_Mai"          -> ok -> didn't work before

Mario

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.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben

- 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.

Mario

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.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I just close and re-open Imatch when I run into this problem.
This proves  that the folder is locked by something inside IM.

Mario

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.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben

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?

Mario

#8
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.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

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)
Best wishes from Switzerland! :-)
Markus

ben

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?

Mario

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.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben

Ok, i will try that tool the next time it happens.
Thanks for the hint.