Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#299 NEdit thinks unchanged windows need save

development
closed-fixed
Eddy De Greef
Program (402)
7
2003-08-13
2003-08-06
Michael Sullivan
No

I was just working in a file, I saved it, checked it into
ClearCase and then went to close the window and NEdit
is asking me to save the file.

The title bar of the window says "<fileName> (read
only)", as opposed to "<fileName> (read only, modified)",
yet NEdit still wants to save it.

This appears to be a 5.4 problem because 5.3 never did
this.

Here's my version info:

NEdit 5.4RC1
Jul 16, 2003

Built on: Unknown, 386, GNU C
Built at: Aug 4 2003, 10:27:02
With Motif: 2.1.0 [@(#)GNU/LessTif Version 2.1
Release 0.93.18]
Running Motif: 2.1 [unknown]
Server: Hummingbird Ltd. 8000
Visual: 24-bit TrueColor (ID 0x23, Default)
Locale: C

Discussion

1 2 > >> (Page 1 of 2)
  • Eddy De Greef
    Eddy De Greef
    2003-08-07

    • labels: --> Program
    • milestone: --> 103146
     
  • Eddy De Greef
    Eddy De Greef
    2003-08-07

    Logged In: YES
    user_id=73597

    I can't reproduce this, but it could be another instance of
    #782513.
    What exactly are your warning preferences? Is "Check
    Modified File Contents" turned on (even if it is probably
    grayed out).
    What exactly does ClearCase do with the file? Does it only
    remove the write permission, or does it remove the original
    file and put a read-only copy in stead (causing the file to
    be missing
    for a split second)? Does it perform any keyword
    substitution (date, version number, ...) on the file?

    If you turn Files Modified Externally on, does it trigger
    any dialogs that may reveal the reason for this behaviour?

     
  • Scott Tringali
    Scott Tringali
    2003-08-07

    Logged In: YES
    user_id=11321

    For the record, please tell us what OS you're using and
    which version. We need to update so we don't "Unknown".
    Are you using Cygwin?

     
  • Logged In: YES
    user_id=836812

    I'm using Cygwin running on Windows 2000 -- shouldn't it say that
    in the version information since I used "make cygwin" to create it.

     
  • Scott Tringali
    Scott Tringali
    2003-08-07

    Logged In: YES
    user_id=11321

    The info is not passed in through the makefile, rather, it
    auto-detects the OS. You probably used a slightly different
    compiler than our usual (Joerg) did, so it's coming up as
    "Unknown". That's not a huge problem, and we can update
    system.h to sniff the right defines (probably __CYGWIN__ or
    something like that).

    Most of us here don't run NEdit on Windows, but if could do
    a "uname -a" that would help us at least know which version
    you're using.

     
  • Logged In: YES
    user_id=836812

    $ uname -a
    CYGWIN_NT-5.0 IMIKEY 1.3.14(0.62/3/2) 2002-10-24 10:48
    i686 unknown

     
  • Logged In: YES
    user_id=836812

    When I turn on the "Files Modified Externally" warning, I can
    no longer reproduce the problem.

    I really prefer this setting to be off because of the macros
    that I use that create windows, save them, and then
    immediately delete them.

    Does this give you enough information to figure out what the
    problem is?

     
  • Eddy De Greef
    Eddy De Greef
    2003-08-11

    Logged In: YES
    user_id=73597

    I still can't reproduce it (I don't have ClearCase), but
    since it is probably related #782513, I expect it to be
    fixed too when we fix that one.

     
  • Logged In: YES
    user_id=836812

    I'm working on tracking it down now. What I know so far is that the
    save dialog is being displayed from the CloseFileAndWindow()
    function because the following if check fails:

    (!window->fileMissing && window->lastModTime > 0)

    The window's lastModTime is zero. Just in case it helps, here's a
    dump of the window structure I printed from Cygwin's GDB:

    (gdb) print *window
    $3 = {next = 0x100707c0, shell = 0x100f6540, splitPane =
    0x101315a0,
    textArea = 0x101334f0, textPanes = {0x6d632f6c, 0x732f7374,
    0x2f6372, 0x0, 0x0, 0x3599}, lastFocus = 0x101334f0, statsLine =
    0x100f8fb8,
    statsLineForm = 0x100f8978, statsLineColNo = 0x100f8c70,
    iSearchForm = 0x100f7020, iSearchText = 0x100f7fc8,
    iSearchRegexToggle = 0x100f79f0, iSearchCaseToggle =
    0x100f7710,
    iSearchRevToggle = 0x100f7ce8, menuBar = 0x100f97d0,
    replaceDlog = 0x0,
    replaceText = 0x0, replaceWithText = 0x0, replaceCaseToggle =
    0x0,
    replaceWordToggle = 0x0, replaceRegexToggle = 0x0,
    replaceRevToggle = 0x0,
    replaceKeepBtn = 0x0, replaceBtns = 0x0, replaceBtn = 0x0,
    replaceAllBtn = 0x100eda80, replaceInWinBtn = 0xce00,
    replaceInSelBtn = 0xc8, replaceSearchTypeBox = 0xc8,
    replaceFindBtn = 0x1007b118, replaceAndFindBtn = 0x61b6d0,
    findDlog = 0x0,
    findText = 0x0, findCaseToggle = 0x0, findWordToggle = 0x0,
    findRegexToggle = 0x0, findRevToggle = 0x10076750, findKeepBtn
    = 0x3,
    findBtns = 0x10078f10, findBtn = 0x0, findSearchTypeBox = 0x0,
    replaceMultiFileDlog = 0x0, replaceMultiFileList = 0x0,
    replaceMultiFilePathBtn = 0x0, fontDialog = 0x0, colorDialog =
    0x0,
    readOnlyItem = 0x10123688, autoSaveItem = 0x1010eec8,
    saveLastItem = 0x10120a28, openSelItem = 0x100fac00,
    closeItem = 0x100fb8d8,
    printSelItem = 0x100fe010, undoItem = 0x100ff548, redoItem =
    0x100ff8f0,
    cutItem = 0x100ffe30, delItem = 0x10100c60, copyItem =
    0x10100160,
    lowerItem = 0x10101eb8, upperItem = 0x10102178, findSelItem
    = 0x10104cb8,
    findAgainItem = 0x10104608, replaceFindAgainItem =
    0x10105f90,
    replaceAgainItem = 0x10106610, gotoSelItem = 0x10107020,
    langModeCascade = 0x1011a2a8, findDefItem = 0x100d08b0,
    showTipItem = 0x101096f8, autoIndentOffItem = 0x1011e6a8,
    autoIndentItem = 0x1011e898, smartIndentItem = 0x1011eb70,
    noWrapItem = 0x1011e538, newlineWrapItem = 0x1011f7c8,
    continuousWrapItem = 0x1011fb30, statsLineItem = 0x10119960,
    iSearchLineItem = 0x10119ce8, lineNumsItem = 0x10119fa8,
    showMatchingOffItem = 0x1010f490, showMatchingDelimitItem =
    0x10122900,
    showMatchingRangeItem = 0x10122b80, matchSyntaxBasedItem
    = 0x10123008,
    overtypeModeItem = 0x10122578, highlightItem = 0x10120420,
    windowMenuPane = 0x10126988, shellMenuPane = 0x101239d0,
    macroMenuPane = 0x10125130, bgMenuPane = 0x10133c28,
    prevOpenMenuPane = 0x100fb180, prevOpenMenuItem =
    0x100fb328,
    unloadTagsMenuPane = 0x100fd158, unloadTagsMenuItem =
    0x100fd300,
    unloadTipsMenuPane = 0x100fdb40, unloadTipsMenuItem =
    0x100fdd70,
    filterItem = 0x101247e8, autoIndentOffDefItem = 0x1010b2f8,
    autoIndentDefItem = 0x1010b590, smartIndentDefItem =
    0x1010b860,
    autoSaveDefItem = 0x10114d88, saveLastDefItem = 0x10114b08,
    noWrapDefItem = 0x1010c658, newlineWrapDefItem =
    0x1010c890,
    contWrapDefItem = 0x1010cbf8, showMatchingOffDefItem =
    0x10115a90,
    showMatchingDelimitDefItem = 0x10115db8,
    showMatchingRangeDefItem = 0x10116078,
    matchSyntaxBasedDefItem = 0x10116500,
    highlightOffDefItem = 0x10110af0, highlightDefItem =
    0x10113930,
    backlightCharsItem = 0x10120768, backlightCharsDefItem =
    0x101142e0,
    searchDlogsDefItem = 0x10110388, beepOnSearchWrapDefItem =
    0x101110d8,
    keepSearchDlogsDefItem = 0x101113f0, searchWrapsDefItem =
    0x10110e90,
    appendLFItem = 0x10116790, sortOpenPrevDefItem =
    0x101153b8,
    allTagsDefItem = 0x1010da30, smartTagsDefItem = 0x1010dc80,
    reposDlogsDefItem = 0x10116d20, statsLineDefItem =
    0x101146a8,
    iSearchLineDefItem = 0x10114508, lineNumsDefItem =
    0x10114870,
    pathInWindowsMenuDefItem = 0x1010ff10, modWarnDefItem =
    0x10116fb0,
    modWarnRealDefItem = 0x10117a18, exitWarnDefItem =
    0x10117d00,
    searchLiteralDefItem = 0x10111e48, searchCaseSenseDefItem =
    0x101120c8,
    searchLiteralWordDefItem = 0x10112378,
    searchCaseSenseWordDefItem = 0x101126b8,
    searchRegexNoCaseDefItem = 0x10112c98, searchRegexDefItem
    = 0x10112978,
    size24x80DefItem = 0x10117680, size40x80DefItem =
    0x101189a8,
    size60x80DefItem = 0x10118c58, size80x80DefItem =
    0x10118f48,
    sizeCustomDefItem = 0x10119220, cancelShellItem =
    0x10124bc0,
    learnItem = 0x10125700, finishLearnItem = 0x10125ac0,
    cancelMacroItem = 0x10125e98, replayItem = 0x10126230,
    repeatItem = 0x101265d0, splitWindowItem = 0x10127098,
    closePaneItem = 0x10105360, bgMenuUndoItem = 0x1013c758,
    bgMenuRedoItem = 0x1013db50,
    filename = "ShowCM.cpp", '\000' <repeats 248 times>,
    path = "/cygdrive/z/model/cmts/src/", '\000' <repeats 231 times>,
    fileMode = 33060, fileFormat = 1, lastModTime = 0, undo = 0x0,
    redo = 0x101347d8, buffer = 0x10133ef0, nPanes = 0,
    autoSaveCharCount = 0,
    autoSaveOpCount = 2, undoOpCount = 0, undoMemUsed = 0,
    fontName = "-*-courier-medium-r-normal--*-120-*-*-*-iso8859-
    1", '\000' <repeats 50 times>,
    italicFontName = "-*-courier-medium-o-normal--*-120-*-*-*-
    iso8859-1", '\000' <repeats 50 times>,
    boldFontName = "-*-courier-bold-r-normal--*-120-*-*-*-iso8859-
    1\000\000\000\000\00010", '\000' <repeats 45 times>,
    boldItalicFontName = "-*-courier-bold-o-normal--*-120-*-*-*-
    iso8859-1", '\000' <repeats 52 times>, fontList = 0x10046938,
    italicFontStruct = 0x1006eac8,
    boldFontStruct = 0x10046520, boldItalicFontStruct = 0x1006f698,
    flashTimeoutID = 0, flashPos = 0, wasSelected = 0, filenameSet =
    1 '\001',
    fileChanged = 0 '\000', fileMissing = 0 '\000', lockReasons = 2,
    autoSave = 1 '\001', saveOldVersion = 0 '\000', indentStyle = 1
    '\001',
    wrapMode = 1 '\001', overstrike = 0 '\000', showMatchingStyle = 1
    '\001',
    matchSyntaxBased = 1 '\001', showStats = 0 '\000',
    showISearchLine = 0 '\000', showLineNumbers = 0 '\000',
    highlightSyntax = 1 '\001', backlightChars = 0 '\000',
    backlightCharTypes = 0x0, modeMessageDisplayed = 0 '\000',
    ignoreModify = 0 '\000', windowMenuValid = 0 '\000',
    prevOpenMenuValid = 0 '\000', rHistIndex = 0, fHistIndex = 0,
    iSearchHistIndex = 0, iSearchStartPos = -1, iSearchLastBeginPos =
    0,
    nMarks = 0, markTimeoutID = 0, markTable = {{label = 0 '\000',
    cursorPos = 0, sel = {selected = 0 '\000', rectangular = 0
    '\000',
    zeroWidth = 0 '\000', start = 0, end = 0, rectStart = 0,
    rectEnd = 0}} <repeats 36 times>}, highlightData =
    0x101346b8,
    shellCmdData = 0x0, macroCmdData = 0x0, smartIndentData =
    0x0,
    fileClosedAtom = 0, languageMode = 2, multiFileReplSelected = 0
    '\000',
    writableWindows = 0x0, nWritableWindows = 0, multiFileBusy = 0,
    replaceFailed = 0, replaceLastRegexCase = 1,
    replaceLastLiteralCase = 0,
    iSearchLastRegexCase = 1, iSearchLastLiteralCase = 0,
    findLastRegexCase = 1,
    findLastLiteralCase = 0}

     
  • Logged In: YES
    user_id=836812

    It looks like lastModTime gets set to zero in the
    CheckForChangesToFile() function; line 1550.

    Note that when all the warnings are turned on, the lastModTime is
    subsequently corrected on line 1557. I suspect that's why I can only
    reproduce it when the warnings are off.

     
1 2 > >> (Page 1 of 2)