Menu

#268 File lock is no longer released on windows. [Ver: 0.16]

closed-fixed
General (289)
5
2009-02-24
2009-02-22
Anonymous
No

Geany 0.16

The directory of the first file opened in a new session will continue to be locked by the file system, even after all files in geany have been closed.

The lock is only released after Geany has terminated.

Reproduction:
1) Create ./Dir1/Test.txt
2) Open ./Dir1/Test.txt
3) Close ./Dir1/Test.txt (Leave Geany running.)
4) Delete ./Dir1 (Error)
5) Exit Geany
4) Delete ./Dir1 (Success)

Notes:
The text file being edited is never locked; the directory containing the text file is.

I used Unlocker (http://ccollomb.free.fr/unlocker/) to verify Geany as the source of the file locks.

Tonurics

P.S. Geany has become one of my favourite editor on windows and linux. Thanks!

P.S.S. Not part of the bug report but 0.16 seams to be much more sluggish than 0.15. Especially when highlighting brackets. It appears that the keyboard repeat key function is reset whenever the caret encounters a bracket. Which causes a ~2 second pause at each bracket when navigating by keyboard. (I am just guessing.)

Discussion

  • Enrico Tröger

    Enrico Tröger - 2009-02-22

    I can't reproduce it on a Windows XP system. I even can't download this unblocker tool as the download is incredibly slow.

    Do you have any plugins active? E.g. the filebrowser plugin could cause such a lock though I'm not sure at all. Apart from that, Geany doesn't do any special regarding file locking neither on Windows nor in general. It's just a weird bug (I guess Windows people call it a feature...) in Windows.

    Regarding the slowiness of 0.16 compared to 0.15: could file another bugreport with detailed information about this? Thanks.

     
  • Nobody/Anonymous

    Thanks for the reply and input.

    I am only using the HTML characters plugin.

    After some more investigating in reproducing the file lock here is what I found out:

    The directory will only be locked if Geany is NOT already running when you double click to "execute" a file, use the "Open with Geany" context menu item or "Open With"->Geany method to launch Geany with the file in question.

    Nothing be locked: if you simply start Geany and use the File->Open command or pass a file name to Geany from the DOS command prompt or Run dialog.

    So, I think the problem might be with the context menu shell command being used to launch Geany with a file. But I wasn't able to find out anything strange after looking through the windows registry. It would be very weird if is in fact a windows issue, since I only started noticing it after upgrading to version 0.16... But I couldn't rule it out.

    An alternate link to the unlocker: http://www.filehippo.com/download_unlocker/ although it isn't very useful if you can't reproduce the file lock to begin with. ;)

    Thanks again for the reply and looking into this.

    Tonurics

    P.S. As for the slowness issue, I haven't had a chance to do more thorough testing and didn't want to waste your time with a false bug report if it turned out to be nothing. So far the other thing I noticed was the CPU usage of Geany on windows is pegged at a constant 7% @ 3.06ghz, even when it is minimized in the background (though I never bothered to look using 0.15; so I don't know if that is a regression or not). I just wanted to raise awareness if you were hearing similar stories from other end users.

     
  • Enrico Tröger

    Enrico Tröger - 2009-02-24
    • assigned_to: nobody --> eht16
    • status: open --> closed-fixed
     
  • Enrico Tröger

    Enrico Tröger - 2009-02-24

    Thanks for the additional information, so I was able to reproduce it and track it down:
    it's nothing new, happens with Geany 0.15 too and probably also with any earlier version. The cause is that when you open Geany through the "Open with Geany" context menu item or by executing a file which is set to open with Geany, the working directory of Geany is set to the directory of this file. That's all.
    I fixed this in the SVN version by setting the current working directory at startup to the Geany installation path.

     

Log in to post a comment.