Home Download Buy Blog Forum Support

Unable to save - Sublime Text 3

Unable to save - Sublime Text 3

Postby bcoyour on Wed Apr 09, 2014 4:41 pm

Hello,

I have a constant issue where I go to save a file and I get an error that pops up with:

Code: Select all
Unable to save
[the file path]
Error: The process cannot access the file because it is being used by another process.


I have tried resaving, opening a different file and going back and saving, turning off atomic_save in my settings and many more things. I usually just copy the whole content of the file, close SublimeText 3, reopen the program paste the content back in and then I can save it. This happens about every other time I save a file and it's become unbearable. It's been happening for quite some time now, but was not there when I first installed the program. There shouldn't be anything else using the files on my machine.

Here is the important info:
• Windows 7 64bit
• SublimeText 3
• I have disabled file backups and virus protection (just as a test, but it didn't change anything)
• These are the packages I have installed: Alignment, Emmet, Emmet LiveStyle, Package Control, Side Bar, SFTP, SublimeLinter

Has anyone experienced this, or have any thoughts? Thank you!
bcoyour
 
Posts: 5
Joined: Tue Jan 21, 2014 3:33 am

Re: Unable to save - Sublime Text 3

Postby swthate on Thu Jun 19, 2014 3:23 pm

I've been having the same problem for a day or so now.

I have Sublime Text 3 on my PC at home, and it has been working fine there (though I haven't used it for some time at home now). At work I had Sublime Text 2 on my PC, and yesterday decided to install ST 3. That's when I started getting this same error. I restarted the PC and it seemed to be working fine for the rest of the afternoon, but it's back at it again this morning.

--- edit ---

OS: Windows 7 64-bit
ST Build: 3059

I have Package Controller and HTML Snippets, I think that's it.
swthate
 
Posts: 1
Joined: Thu Jun 19, 2014 3:21 pm

Re: Unable to save - Sublime Text 3

Postby wbond on Thu Jun 19, 2014 5:02 pm

Windows has a very lock-happy filesystem. Unfortunately some programs will lock and file an not let go. This happens sometimes in Windows Explorer. You'll go to a folder and look at some files and they try to delete the folder. Windows won't let you because it says the file is in use. In those situations, you usually have to close explorer.exe and re-launch it to delete the file.

From my experience, the (naive) way to figure out what is locking the file is to close other programs one at a time. If all of your other programs are closed, start stopping services. Such as your antivirus, Windows Search Indexer, etc. Sometimes it is even explorer.exe. You could also try ending the Sublime Text indexer executable to see if that is locking the file. The way it is written right now it should bail on a file if it is having trouble, but I do know of one person who ran into issues with something on their machine locking up the Sublime Text indexer.

There may be a better way to figure out what is locking the file, however I don't know off of the top of my head.
wbond
 
Posts: 528
Joined: Mon Feb 28, 2011 5:33 am

Re: Unable to save - Sublime Text 3

Postby Orlmente on Thu Jun 19, 2014 5:34 pm

eMarvin wrote:
swthate wrote:I've been having the same problem for a day or so now.

[...]

I have Package Controller and HTML Snippets, I think that's it.


I've seen this too, and I don't have any plugins installed on the windows machine.

Probably a bug in the atomic save thing, because it works without it.


I don't think this problem is strictly related with atomic save, I can reproduce the error (from time to time) even with atomic save set to false if i hit ctrl+s several times in a row.
It's more like the os can't unlock the file as fast as the keyboard commands are sent... (of course it could be also ST's bug or even a combination of st and win that trigger the problem)
Orlmente
 
Posts: 100
Joined: Mon Mar 18, 2013 12:37 pm

Re: Unable to save - Sublime Text 3

Postby Orlmente on Thu Jun 19, 2014 7:41 pm

eMarvin wrote:2) ST is unable to save multiple times in quick succession (just keep ctrl+s pressed)

This seems to be the case as, like I wrote just above you can reproduce the problem even with no atomic-save...
Anyway, what's the advantage to repeatedly hitting ctrl+s? I mean, after first hit the file is saved... there's no real need to do it again and again in rapid succession... or at least no needs that I'm aware of...
Orlmente
 
Posts: 100
Joined: Mon Mar 18, 2013 12:37 pm

Re: Unable to save - Sublime Text 3

Postby MarkovC on Mon Jun 30, 2014 11:31 am

Orlmente wrote:
eMarvin wrote:2) ST is unable to save multiple times in quick succession (just keep ctrl+s pressed)

This seems to be the case as, like I wrote just above you can reproduce the problem even with no atomic-save...
Anyway, what's the advantage to repeatedly hitting ctrl+s? I mean, after first hit the file is saved... there's no real need to do it again and again in rapid succession... or at least no needs that I'm aware of...


I have the same problem. The point of quickly doing ctrl+s is just to show the bug in an easy way, at least for me. The error comes even without doing this, but less frequently. Also, I sometimes press the 's' too long, so I accidentally get this message.

Because of this bug, I have lost files, because the error occured when leaving sublime during a reboot
MarkovC
 
Posts: 5
Joined: Mon Jun 30, 2014 11:00 am


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 23 guests