Author Topic: SlickEdit 18.0.1 is locking a file that is not open  (Read 1755 times)

rowbearto

  • Senior Community Member
  • Posts: 536
  • Hero Points: 12
SlickEdit 18.0.1 is locking a file that is not open
« on: October 15, 2013, 01:56:40 pm »
Hi:

I installed SE on a new machine and copied my configuration (less its subdirectories) from my old machine to the new machine.

Now, whenever SE is running, even if all files are closed and no file is open, it still has a lock on one of the files on my PC (which has same path/location) as old PC.

The "File Locking" has always been off.  Also, this file is a large file, larger than the "Load partially when files are larger than (KB) size".

But since the file is not open in SE, it should not be locked.

This file needs to be deleted as part of a test, so it forces me to close SE while the test is running, which I sometimes forget to do.

I tried opening and then closing the file in SE, but even after closing it, while SE is open, the file is locked.  If I close the SE application, there is no longer a lock on the file.

Is there any way to force SE to not lock this file anymore?

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #1 on: October 15, 2013, 03:12:24 pm »
Try the list-buffers command to see if that file appears in the buffers list. There might be an entry for it in your vrestore.slk file (inside your config) which could cause that file to be opened as a temp file (with no UI window). Once you close it from the list-buffers window, then close the editor, that entry should now be scrubbed from your auto-restore info.

rowbearto

  • Senior Community Member
  • Posts: 536
  • Hero Points: 12
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #2 on: October 15, 2013, 03:16:43 pm »
Thanks Matthew.

When I try "list-buffers", and all files are closed (no tabs), I get an error message: "Command is disabled for this object".

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #3 on: October 15, 2013, 03:19:36 pm »
You can either open up a file (to enable the command), or you can show the exact same list (without needing a file open) using the View > Tool Windows > Files menu command. Then click on the "buffers" tab in that dialog.

rowbearto

  • Senior Community Member
  • Posts: 536
  • Hero Points: 12
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #4 on: October 15, 2013, 03:25:31 pm »
With no files open, I did the view->tool windows->files.

Then when I look in the "Buffers" tab, there is nothing listed there.

Yet the file is still locked by SE (as reported by the 'unlocker' tool).  When I close SE, the unlocker tool shows nothing locking it.

rowbearto

  • Senior Community Member
  • Posts: 536
  • Hero Points: 12
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #5 on: October 15, 2013, 03:28:28 pm »
I edited the vrestore.slk file with notepad++ while SE was closed and took this file out.

But then when I open SE, it still says the file is locked.

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #6 on: October 15, 2013, 03:40:59 pm »
Is this file potentially part of a source directory that might be tagged for symbols? (Either a compiler include path or project/workspace file?)

rowbearto

  • Senior Community Member
  • Posts: 536
  • Hero Points: 12
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #7 on: October 15, 2013, 03:42:40 pm »
No, this file is a memory map file generated by a build process.  I often open it to see the addresses of my symbols.

Also, I do not have a workspace open at all, and no files open, and the file is locked.

I tried deleting the file, opening SE, undeleting the file, closing SE, reopening SE, but when I reopen SE it locks the file.

rowbearto

  • Senior Community Member
  • Posts: 536
  • Hero Points: 12
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #8 on: October 15, 2013, 03:45:19 pm »
I got rid of the problem by creating a blank dummy workspace, then closing that workspace.

Now SE doesn't lock the file anymore.

Thanks for your help and giving me some hints!

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #9 on: October 15, 2013, 03:46:54 pm »
That's a weird work-around, but glad it cleared it up.

I'm curious to know what your default File Locking option is set to. It's in the Tools > Options dialog under the File Options > Load section.

rowbearto

  • Senior Community Member
  • Posts: 536
  • Hero Points: 12
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #10 on: October 15, 2013, 03:48:12 pm »
My file locking option has been set to "off" the entire time, as I wrote in my initial post.

rowbearto

  • Senior Community Member
  • Posts: 536
  • Hero Points: 12
Re: SlickEdit 18.0.1 is locking a file that is not open
« Reply #11 on: October 15, 2013, 03:53:29 pm »
FYI:  The file size is 24MBytes, and my "Load partially when files are larger than (KB)" is set to 8000, so it exceeds this size.

According to this post, even with locking off, SE will still hold a lock on large files greater than the partial load size (http://community.slickedit.com/index.php?topic=511.0).  This has annoyed me in the past because if I do a build and the .map file is open in SE, then the build fails when the linker tries to overwrite this file - I always need to remember to close this file before a build, sometimes I forget and waste time.  It would be nice if the partially loaded file was not locked, it would solve this annoyance for me.