Page 1 of 1

Unable to Delete = File In Use

Posted: 22 Jun 2014 12:11
by Zardoz2293
For approximately eight weeks now, new builds of XY can result in a version of XY which will create a file handle of a file copy and then the handle doesn't get deleted but unassociated with a non-existent process. Updating to a newer version of XY will sometimes result in the problem apparently going way, yet to return in a future update.

Tonight, I've spent the past couple of hours trying to find the source of the problem and it always associated with XY (and / or XYcopy). My environment is Windows 7 64-bit. It can occur as simple as making a backup copy of an executable, then immediately (or later, same XY session) attempting to delete the file. Always results in the "file in use" message. Open a command prompt at the directory location, unload XY, and delete the file manually always removes the file. However, if you were to attempt to unload XY and then reload XY to delete the file, the "file in use" message occurs.

Using Microsoft / Sysinternals Process Explorer to look at what has a handle to the file results in XY as the source, and in some cases for a single operation there may be half a dozen handles for the same file -- it's not consistent and what causes "more" to exist seems random, regardless of one or more the result is the same, unable to delete.

What brings me to post my concern now, rather than weeks ago, is, previously, the problem wasn't so stubborn as it is with the current 14.20.0203 variant. Typically there's absolutely no reason why I need to perform a warm or cold boot for months on end. However, tonight, I've done it a dozen times to find the culprit.

Clarification:
The only executable that will not delete are WinRAR SFX Executables.

Re: Unable to Delete = File In Use

Posted: 22 Jun 2014 13:49
by admin
Hmm, strange, I have [never!] seen this here and I'm sure XY is not the cause of the issue. Simply because nothing in this has be changed in the code for a long time.

Re: Unable to Delete = File In Use

Posted: 22 Jun 2014 14:11
by bdeshi
Speaking of sysinternals, they have a tool called "handle". You can try that on the locked file to see if XY's got a open handle to that file. Run handle.exe -p xyplorer

Re: Unable to Delete = File In Use

Posted: 22 Jun 2014 16:22
by Zardoz2293
SammaySarkar wrote:Speaking of sysinternals, they have a tool called "handle". You can try that on the locked file to see if XY's got a open handle to that file. Run handle.exe -p xyplorer
XY has the handle, that's why I've posted my concern.

Re: Unable to Delete = File In Use

Posted: 22 Jun 2014 16:29
by Zardoz2293
admin wrote:Hmm, strange, I have seen this here and I'm sure XY is not the cause of the issue. Simply because nothing in this has be changed in the code for a long time.
Well, if XY isn't "causing" the issue, then why is XY allocating locks on the file? More importantly XY continues to add additional locks on the file.

:veryconfused:

Update:
In the case of opening a WinRAR SFX the following happens:
1. Open WinRAR SFX inside of XY
2. XY puts a lock on the executable
3. WinRAR puts a lock on the executable
4. Exit WinRAR
5. WinRAR removes the lock on the executable
6. XY keeps its lock
For each time you perform a loop from 1 through 6, XY adds another lock on the file.

Re: Unable to Delete = File In Use

Posted: 23 Jun 2014 18:04
by Zardoz2293
Utilizing LockHunter:

If I select, as in left-mouse click, a folder in the TV there will be 5 locks associated with XY. Why would there be more than 1 lock? It's the same number of locks (five) regardless of what folder is selected.

However, if I right-click a folder in the TV folder LockHunter reports zero locks, which is what I'd expect.

LockHunter reports XY has a lock on a file when the file is not highlighted in XY. The 'file' in question has the file-location-pointer indicator (or whatever it is called) on that file, but there should not be any locks on it.

Re: Unable to Delete = File In Use

Posted: 23 Jun 2014 21:46
by admin
LOL, I had forgotten a "never" in my first reply. I added it now.