Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#580 Repeated File Open fails

development
closed-fixed
Program (402)
9
2007-03-04
2007-01-26
Thorsten Haude
No

The device/inode identifier introduced in SF#1027788 are not initialized properly in CloseWindow() and thus erroneously reports any file opened and closed as still opened. This only shows if nedit.honorSymlinks is set to false.

To repeat:
(unset NEDIT_HOME && source/nedit -xrm "nedit.honorSymlinks: False")
- open any file
- close it
- open it again

(Thanks to Bert Wesarg for pointing this out.)

Discussion

  • Thorsten Haude
    Thorsten Haude
    2007-01-28

    Logged In: YES
    user_id=119143
    Originator: YES

    File Added: deviceInode.2007-01-28.2.diff

     
  • Andrew Hood
    Andrew Hood
    2007-01-29

    Logged In: YES
    user_id=36856
    Originator: NO

    Are you sure this is the only place the device & inode need initialising? window->lastModTime is set to 0 three times in source/window.c and four times in source/file.c as part of WindowInfo initialisations/cleanups.

    There is a comment in one place that we possibly should do:

    memset(window, 0, sizeof(WindowInfo));

     
  • Thorsten Haude
    Thorsten Haude
    2007-01-29

    Logged In: YES
    user_id=119143
    Originator: YES

    I'm not at all sure. I looked over the other stuff yesterday, found some code segments in serious needs of refactoring (eg. CreateDocument()/CreateWindow()), immediatley thought about my whining during the last years and stopped thinking about it. Sorry.

    So please, by all means, point out any places where initialisations are needed. I will have a look at the window->lastModTime positions later today.

    So I think we shouldn't call memset() but initializeWindowInfo(WindowInfo* window) and think about the problem elsewhere. Refactoring. Sigh.

     
  • Thorsten Haude
    Thorsten Haude
    2007-01-29

    Logged In: YES
    user_id=119143
    Originator: YES

    File Added: deviceInode.2007-01-29.1.diff

     
  • Logged In: NO

    Yooden:

    We need you commit your fixes into the CVS, not only this one but also other ones.

    thanks.

     
  • Thorsten Haude
    Thorsten Haude
    2007-01-31

    Logged In: YES
    user_id=119143
    Originator: YES

    I use a waiting period to give others the chance to find bugs in my fixes. That worked in at least one case, so I think I will keep it up. (And I have no idea what "other ones" you are talking about.)

     
  • Logged In: NO

    "Other ones" - I really meant your fix for 1608609.

     
  • Thorsten Haude
    Thorsten Haude
    2007-03-04

    • status: open --> closed-fixed