KKBOX / CompassApp

Compass.app helps designers compile stylesheets easily without resorting to command line interface
http://compass.kkbox.com
GNU General Public License v2.0
757 stars 89 forks source link

compass app locks source files #91

Open Tinyfish opened 12 years ago

Tinyfish commented 12 years ago

Am using the compass app in conjunction with Dreamweaver. After an indeterminate number of edits to one of the .scss files, Dreamweaver refuses to save the .scss file because there is a sharing violation. Using Unlocker, I find at this point that the CompassApp has locked the file and I need to use Unlocker to manually unlock the file before I can continue. Things are then fine until another indeterminate number of edits later when the process repeats.

hlb commented 12 years ago

in windows?

Tinyfish commented 12 years ago

Yes, sorry, Windows 7, 64 bit, Dreamweaver 5.5. I feel sure some sequence of editing/saving triggers it, but although I can reproduce the problem fairly quickly, I haven't managed to pin down the sequence that causes it...

It's something like:

1) Start up compass app 2) Start up Dreamweaver 3) edit .scss file 4) Save .scss file 5) Preview web page from Dreamweaver with F12 into Opera 6) Repeat 3,4,5 until sharing violation occurs on step 4

hlb commented 12 years ago

@Tinyfish Our designer was using Windows 7 + Dreamweaver + Compass.app and without any problem (he jumps to SublimeText recently). But it seems Dreamweaver does have some strange issue about locking file:

Suggestions:

  1. turn off index system in windows: http://www.techsupportforum.com/forums/f49/dreamweaver-cs4-sharing-violation-376991.html
  2. Do not use preview panel in Dreamweaver (we have livereload support!)

We will also ask our designer to try Dreamweaver again. Hope we can figure out the problem.

Tinyfish commented 12 years ago

It was definitely not Dreamweaver that was locking the file - it was definitely the compass.app. I found both the suggestions you mention and I was already using them :-/

Most of the locking issues with Dreamweaver were to do with the ColdFusion server, which I am not using.

Hopefully your designer can reproduce this mystery and figure it out - thanks for helping

hlb commented 12 years ago

@Tinyfish We have reproduced this issue. Twice :-(

We guess that both Dreamweaver and Compass.app (powered by Java) will try to lock SCSS file in Windows, and in some race condtion, the file is hold by one of them and not unlocked.

We will try to fix that issue if possible, but we suggest you to use Sublime Text in this moment. Our designer jumps ship to Sublime Text and is very happy ;-)

Tinyfish commented 12 years ago

Well thanks for your suggestion, but I'm afraid I can't just dump all the asset libraries and templates that I use, to swap to a different piece of software that doesn't support them.

I will do some more testing, but I'm pretty sure that it's always the Compass App that holds the lock, which wouldn't always be true if it were a race condition. I shall just have to keep using Unlocker until you find a fix.

adamcoulombe commented 12 years ago

Hey, I'd like to plug in a second request to have this fixed... I have tried sublime text and still prefer dreamweaver... Your app is PERFECT except for this flaw. Thanks in advance!!

10secondtourism commented 12 years ago

Same problem here... process explorer indicates that compass-app.exe is locking the file and preventing dreamweaver from saving.

adamcoulombe commented 11 years ago

bump! New versions of the app are being released and this still isn't fixed! I've purchased compass.app and fire.app and they both have this issue

hlb commented 11 years ago

@adamcoulombe sadly we are not Adobe and can not debug dreamweaver :-(

Tinyfish commented 11 years ago

Well, just stop locking files then. If it was Dreamweaver, then it would be Dreamweaver that holds the lock. But it isn't. It's your app that holds the lock.

Also, it is Dreamweaver that cannot write the file. Therefore, it is STILL your app that holds the lock - Dreamweaver would be able to write to the file if it held the lock!

adamcoulombe commented 11 years ago

Locked by compass-app.exe

adamcoulombe commented 11 years ago

@tinyfish (or anyone else having this issue). While these folks are hopefully working on this bug, I will note that have found a quicker way to unlock the file using the command line:

  1. Get handle.exe
  2. When file gets locked, copy the following line into your command prompt (run as administator) and run it -- modify the file paths as necessary:

for /F "tokens=3,6 delims=: " %I IN ('handle.exe -accepteula x:\path\to\file.scss') DO handle.exe -c %J -y -p %I

  1. leave your command prompt window open, next time file locks, just press the up key on your keyboard to use the command again, repeat as necessary
hlb commented 11 years ago

@adamcoulombe thank you for the information. We will try to test with handle.exe too.

Tinyfish commented 11 years ago

I've now managed to reproduce the issue with Windows 7 Wordpad instead of Dreamweaver. Symptoms are identical.

johnasp commented 11 years ago

I am getting exactly the same problems on the same setup. It is so annoying it's driving me mad.

Toddish commented 11 years ago

I've experienced this too.

It happened when I was trying to compile the file I was editing. Say I have only a site.scss in an scss folder, which compiles to site.css in a css folder on the same level, I can't edit the site.scss file unless I close compass.

If I use my usual set up (having a site.scss file that @imports all my other scss files), it works fine.

Hopefully that'll help someone!

lmirabile commented 11 years ago

I am having the same problem, and have for quite a long time. Running Windows 8 64 bit, the latest version of compass, and Dreamweaver 5. In the past I've found quitting compass and restarting it has solved the problem, but today that didn't work - nor did rebooting my machine.

adamcoulombe commented 11 years ago

@lmirabile see my comment above about using handle.exe. That should take care of the locked file for now

Sureiya commented 11 years ago

2013-04-29_2319 I have this problem constantly, on linux and windows both, using sublime text 3. I've verified that it is the java process holding the lock. fire.app is pictured there, but I'm assuming the bug is the same, and affects both.

johnasp commented 11 years ago

I had a brainwave to move the handle.exe fix into a batch file and assign a keyboard shortcut to the batch which means you can fix this with a click of a button. I have blogged full instructions for How to fix Compass App lock file scss problem in Dreamweaver here.

hlb commented 11 years ago

@Sureiya it is really weird to happen on Linux. What is your OS and version?

@johnasp and all, we will try hard to figure out the problem. It is really annoying :(

adamcoulombe commented 11 years ago

@hlb what about adding the option to run a custom shell command after each compile. This would allow us to run handle (or anything else for that matter) every time to remove unlocks. I know its not the solution, but this issue doesnt seem to be going anywhere too quickly, so adding a feature like this might be an option

mbohanon commented 11 years ago

Wish this was fixed in Compass.app, such a great tool to use, so very crippling when this happens over and over and over and over again. STOP LOCKING FILES!