Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    File edits not changing file status

    Help wanted · · · – – – · · ·
    bug file status virus scanner
    4
    26
    615
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • David Tyler
      David Tyler last edited by

      Hello

      I’m having an issue where I can edit a text file in NP++ but the file status doesn’t change in the editor, and even if I save, my changes are lost. If I reload the file, the contents are displayed as they were before my edit. I’m using NP++ in multi instance mode if that’s of relevance…

      I can consistently reproduce the behaviour.

      1. Create a new file, enter some text, save it. The file is correctly marked as new/modified.
      2. Add some more text to the file - the file is not marked as modified. I hit save and the file is not saved.
      3. I reload and my edits are lost.
      4. If I now re-edit the file, it’s marked as modified and the save works.

      Is there a reason NP++ wouldn’t mark a file as edited (change the colour of the tab to red etc) even when I type new characters into it? This is happening with new files and existing ones. My only thought is that our corporate virus scanner is somehow messing with NP++ but I don’t understand why it’s not marking the file as modified when I type new characters in. I’ve disabled the file status detection and restarted np++ but that’s not helped.

      Any thoughts on how I can debug this further?

      Ekopalypse 1 Reply Last reply Reply Quote 0
      • Ekopalypse
        Ekopalypse @David Tyler last edited by

        Hmm, this is the second time I see such a complaint.
        See here for details.
        A new installation fixed it for the OP.
        Still wondering why and how this might happen.
        @David-Tyler - do you use an installed or portable version?
        Which version do you use at all? (can be seen from debug-info from ? menu)
        If you use an installed version, how did you install it?
        Is something different on your OS compared to the standard installation? Something like language, filesystem …?

        doubledeej 1 Reply Last reply Reply Quote 1
        • David Tyler
          David Tyler last edited by

          Hi @Ekopalypse

          Thank you for the link - that is indeed the behaviour I’m seeing. My version of np++ is

          Notepad++ v7.8.4 (64-bit)
          Build time : Jan 29 2020 - 01:31:03
          Path : C:\Program Files\Notepad++\notepad++.exe
          Admin mode : OFF
          Local Conf mode : OFF
          OS Name : Windows 10 Enterprise (64-bit)
          OS Version : 1809
          OS Build : 17763.1039
          Plugins : ComparePlugin.dll mimeTools.dll NppConverter.dll NppExport.dll SessionMgr.dll SQLinFormNpp64.dll SurroundSelection.dll XBrackets.dll

          I’ve recently updated the installation but the problem is still there. I did try renaming the appdata/np++ folder and relaunching but it didn’t make a difference.

          I installed using the regular installer - it’s not the portable version.

          OS wise, we have our virus scanner - I do have local admin rights. I though this might be an issue with mercurial (source control) but tested the problem in folders not under source control and the problem is the same.

          File system on the disk is NTFS with indexing switched on. There’s no quota management enabled and the disk is about 50% full (ever the optimist).

          Language on the OS is US english with UK english as an option. Nothing else stands out as being particularly unusual about the installation.

          From the link you provided, there was a suggestion to uninstall and reinstall from scratch so I might give that a go - I’ve updated several times over the last few months and the problem has persisted.

          1 Reply Last reply Reply Quote 1
          • David Tyler
            David Tyler last edited by

            only other thing of note is that I’m using multi instance. I’ll try with single instance and see if it makes a difference

            1 Reply Last reply Reply Quote 0
            • David Tyler
              David Tyler last edited by

              Interesting. So the behaviour does seem to be specific to the 64bit version.

              I uninstalled the 64 bit version, selected not to keep custom settings and reinstalled. The behaviour persisted.

              I uninstalled the 64bit version, selected not to keep custom settings and then installed the 32bit version. In the 32 bit version I can’t reproduce the issue.

              Notepad++ v7.8.5 (32-bit)
              Build time : Mar 4 2020 - 11:04:20
              Path : C:\Program Files (x86)\Notepad++\notepad++.exe
              Admin mode : OFF
              Local Conf mode : OFF
              OS Name : Windows 10 Enterprise (64-bit)
              OS Version : 1809
              OS Build : 17763.1039
              Plugins : mimeTools.dll NppConverter.dll NppExport.dll

              I’m guessing there is more info I could provide to help with debugging further - any suggestions as to what would be good to bundle up?

              Ekopalypse 1 Reply Last reply Reply Quote 2
              • Ekopalypse
                Ekopalypse @David Tyler last edited by Ekopalypse

                @David-Tyler
                Just to confirm, I’m working with npp x64 and multiinst mode consistently.
                I haven’t had any issues but I do use Windows7 x64

                The part which doesn’t make sense to me is

                Add some more text to the file - the file is not marked as modified

                You were able to create the file with some initial text but updating it failed.
                So from logical point of view it cannot be a permission issue
                unless something changed it after file creation but this would not
                explain why editing works again after reloading.

                What I would try to do in such a case is to use procmon and see
                if it can reveal what happens under the hood.

                One other thing I found, it seems that Win10 introduced something new called Controlled folder Access.
                It has been reported that this can cause the symptoms
                you mentioned and it seems can be solved by following this instructions.

                Maybe this new feature is still buggy under some circumstances and
                temporarily disabling it for testing might be a good first step as well.

                As you see, I’m fishing in the dark.

                David Tyler 1 Reply Last reply Reply Quote 0
                • David Tyler
                  David Tyler @Ekopalypse last edited by

                  @Ekopalypse

                  Yes I’m guessing this is a combination of windows 10 and 64bit. I’ve been using 64 bit for the last 12 months and I only noticed the issue a few months back but wasn’t able to reproduce.

                  You were able to create the file with some initial text but updating it failed.
                  So from logical point of view it cannot be a permission issue
                  unless something changed it after file creation but this would not
                  explain why editing works again after reloading.

                  Yes, it feels like it’s more about internal state in np++ than something external. It seems like something is interfering with the file being marked as dirty. So the steps are:

                  1. Create new file.
                  2. Add text
                  3. Save it
                  4. Add more text
                  5. Save remains disabled
                  6. Reload - edits lost
                  7. Reapply edits, save enabled
                  8. Save file

                  I’ll have a look at procmon and come back with findings etc.

                  Re the controlled folder access, unfortunately I can’t do anything with that as it’s locked down as part of corporate policy etc.

                  Thank you for your help and suggestions.

                  1 Reply Last reply Reply Quote 1
                  • David Tyler
                    David Tyler last edited by

                    Just a further update to this, it seems I was a bit quick off the mark in declaring this a 64bit issue. It’s happening with the 32bit version too. I’ll dig more with procmon

                    1 Reply Last reply Reply Quote 1
                    • doubledeej
                      doubledeej last edited by

                      My copy has started doing this again too.

                      1 Reply Last reply Reply Quote 0
                      • doubledeej
                        doubledeej @Ekopalypse last edited by doubledeej

                        @Ekopalypse While a re-install did initially solve the problem, it’s back again for me.

                        It seems to only affect NEW files in my situation, not opening an existing file. So for the time being, until a fix is found, I’ll do the initial save on a new file, close the file, then re-open it. If I continue to edit after the initial save (without closing and re-opening), subsequent changes are never detected and the File/Save command is still disabled so I can’t save. So if I do continue to edit after the initial save, all of those changes are lost unless I File/Save As to save it as a new file, delete the original file, then rename the new file.

                        It’s definitely awkward, and has caused me quite a bit of grief and unnecessary time trying to track down and fix bugs in my code, when the problem is that my fixes for the bugs haven’t actually been committed to disk, so the updated versions of the code aren’t being run.

                        Ekopalypse 1 Reply Last reply Reply Quote 0
                        • Ekopalypse
                          Ekopalypse @doubledeej last edited by

                          @doubledeej

                          That’s a tough one if we cannot find a pattern/way to replicate this.
                          I’ve been working with 7.8.4 and now 7.8.5 for some time and never
                          experienced this situation.
                          The only advice I can give at the moment is to use tools like procmon
                          to see if it can reveal the source of the problem.

                          I understand if one says: Neither do I have the time nor the desire to deal with tools like procmon to identify the problem.
                          But our issue is that we have little approach to find the reason for this problem if it does not occur in our case.

                          1 Reply Last reply Reply Quote 2
                          • doubledeej
                            doubledeej last edited by

                            What would I look for in procmon?

                            It’s difficult for me to give any more steps to replicate. It now happens every single time on my system now. I can’t get it to not misbehave.

                            I’m currently running version 7.8.5, 32-bit version on Windows 10 Enterprise 64-bit in an Active Directory environment (yes, I run AD at home). AMD Ryzen 9 3950X processor, 64 GB of RAM, 21 TB of storage (5 TB in SSDs, 16 TB HDDs), nVidia RTX 2080 video. The plugins I have installed are: HEX-Editor 0.9.5, JSON Viewer 1.34, Mime tools 2.5, Npp Converter 4.2.1, Npp Export 0.2.9, NppFavorites 1.0.0.1, Session Manager 1.4.3. At any given time I usually have about a dozen PHP files open.

                            Ekopalypse Terry R 2 Replies Last reply Reply Quote 0
                            • Ekopalypse
                              Ekopalypse @doubledeej last edited by

                              @doubledeej

                              for example I created filters for process notepad++exe and file cydialog.pyx

                              5b333a3b-606d-4156-9b03-7e2a2acf363d-image.png

                              and made sure the file activities are selected (red arrow).
                              You will get results like

                              580b098a-1785-4aad-87a5-9be887c1335c-image.png

                              The most interesting here are the write and close operations.

                              If you scroll more to the right you will see additional useful information

                              37ba710a-cf69-4e76-982c-1577ea80c077-image.png

                              1 Reply Last reply Reply Quote 1
                              • doubledeej
                                doubledeej last edited by

                                There isn’t much there. But the problem did occur in this scenario.

                                https://www.djprod.biz/NPPLogfile2.CSV

                                I created a new file, added some code, saved it as test.php, made some more changes, and the File / Save command was disabled.

                                Ekopalypse 1 Reply Last reply Reply Quote 0
                                • Ekopalypse
                                  Ekopalypse @doubledeej last edited by

                                  @doubledeej

                                  hmm, there are only 3 rows in your trace which do have test.php in it

                                  "10:26:42.6211877 AM","notepad++.exe","34880","CreateFile","C:\redacted\test.php","SUCCESS","Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
                                  "10:26:42.6212222 AM","notepad++.exe","34880","QueryBasicInformationFile","C:\redacted\test.php","SUCCESS","CreationTime: 3/24/2020 10:26:42 AM, LastAccessTime: 3/24/2020 10:26:42 AM, LastWriteTime: 3/24/2020 10:26:42 AM, ChangeTime: 3/24/2020 10:26:42 AM, FileAttributes: A"
                                  "10:26:42.6212463 AM","notepad++.exe","34880","CloseFile","C:\redacted\test.php","SUCCESS",""
                                  

                                  Just a CreateFile with READ access a QueryBasicInformationFile and
                                  a CloseFile. No WriteFile

                                  Another strange thing, those APIs are normally not reported but
                                  IRP_MJ_CREATE, IRP_MJ_QUERY_INFORMATION … are.

                                  Can you post your debug-info from notepad++ ? menu?

                                  How long is the path of "C:\redacted\test.php" in real?
                                  Do you hit some ancient windows limits like 128 or 260 ?

                                  1 Reply Last reply Reply Quote 1
                                  • doubledeej
                                    doubledeej last edited by doubledeej

                                    I only uploaded the portions of the log that seemed relevant. I probably trimmed out too much. I’ve re-uploaded using the same URL as before without removing anything.

                                    The real path of the files is 60 characters or fewer. All English alphanumeric characters, no spaces. The portion I removed was about 20 characters.

                                    Notepad++ v7.8.5 (32-bit)
                                    Build time : Mar 4 2020 - 11:04:20
                                    Path : C:\Program Files (x86)\Notepad++\notepad++.exe
                                    Admin mode : OFF
                                    Local Conf mode : OFF
                                    OS Name : Windows 10 Enterprise (64-bit)
                                    OS Version : 1909
                                    OS Build : 18363.720
                                    Plugins : HexEditor.dll mimeTools.dll NppConverter.dll NppExport.dll NppFavorites.dll NPPJSONViewer.dll SessionMgr.dll

                                    Ekopalypse 1 Reply Last reply Reply Quote 1
                                    • Ekopalypse
                                      Ekopalypse @doubledeej last edited by Ekopalypse

                                      @doubledeej

                                      first, I know why your report used createfile etc… while I’m used to see
                                      IRP_MJ_CREATE - it is because I use enable advanced output from filter menu.

                                      You said in an earlier post that this happened with a plain installed,
                                      no plugins, npp as well, therefore I’m ignoring possible plugin issues.

                                      The output doesn’t provide much new information about the problem,
                                      except for one additional process.
                                      It looks like you are using some kind of synchronization software named Resilio Sync.
                                      I know it sounds weird but could you try to see if it happens as well while this software is temporarily disabled?
                                      In addition, can you check
                                      %APPDATA%\Resilio Sync\ShellExtIO.log
                                      for reporting unusual behavior?

                                      1 Reply Last reply Reply Quote 1
                                      • doubledeej
                                        doubledeej last edited by

                                        I shutdown Resilio Sync and the behavior of Notepad++ didn’t change.

                                        1 Reply Last reply Reply Quote 0
                                        • doubledeej
                                          doubledeej last edited by

                                          I checked the Resilio log, and there doesn’t seem to be anything unusual in there.

                                          Ekopalypse 1 Reply Last reply Reply Quote 0
                                          • Ekopalypse
                                            Ekopalypse @doubledeej last edited by

                                            @doubledeej - sorry, I’m running out of ideas.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright © 2014 NodeBB Forums | Contributors