• Login
Community
  • Login

Monitor (tail -f) prompts to reload file

Scheduled Pinned Locked Moved General Discussion
15 Posts 9 Posters 16.4k Views
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.
  • J
    jhyslop
    last edited by Apr 25, 2019, 3:23 PM

    In version 7.6.6, if I turn on monitoring (View -> Monitor), whenever the file changes NPP is now popping up a message box asking if I want to reload it. Well, yes, of COURSE I want to reload it - that’s why I turned on monitoring!

    In the previous version NPP automatically reloaded the file.

    M 1 Reply Last reply Apr 25, 2019, 7:03 PM Reply Quote 2
    • M
      Meta Chuh moderator @jhyslop
      last edited by Apr 25, 2019, 7:03 PM

      welcome to the notepad++ community, @jhyslop

      i believe you, albeit not being able to reproduce this.
      (see screencast below, with working monitoring on 7.6.6 x64)

      we had a second report about this, so we suppose it might be a setting, plugin, or leftover from an old installation that could cause this.

      please test the following, to verify, if a clean notepad++ (without any plugins or settings that could cause this) would work on your system.

      • download the notepad++ 7.6.6. 64 bit portable version from >>> here <<<.
        (the portable version does not require any installation and runs completely independent and isolated from your installed version. all custom settings, as well as any stuff you might want to try at the portable version, will not modify your installed version)

      • extract npp.7.6.6.bin.x64.zip to e.g. your desktop.

      • important note: make sure to close all instances of notepad++ that might be running, before starting the portable version at the next step, to be sure you are using the portable version for this test.

      • open the extracted npp.7.6.6.bin.x64 folder and start this portable version by double-clicking on notepad++.exe inside this folder.
        (note: notepad++.exe will just be seen as notepad++, if you have enabled to hide all known file extensions at your explorer settings)

      • retry monitoring (tail -f) on the same files using this portable version.

      working monitoring (tail -f) on 7.6.6. x64:
      Imgur

      many thanks and best regards

      1 Reply Last reply Reply Quote 5
      • I
        IT Staff
        last edited by May 7, 2019, 1:49 PM

        I have been seeing this same issue. I tried the suggestion of downloading the zip and running in portable mode, but still seeing prompts to reload the file. Sometimes it does update the file even though it prompts, and sometimes I have to acknowledge the prompt to get it to reload. I did occasionally see this behaviour in the past but it was very rare. I noticed that so far I have only been able re-create this issue when monitoring files on the network. When I monitor a file on my local computer I have not yet seen the prompt (although I rarely do this).

        M 1 Reply Last reply May 8, 2019, 6:17 AM Reply Quote 4
        • M
          Meta Chuh moderator @IT Staff
          last edited by May 8, 2019, 6:17 AM

          @IT-Staff

          this issue is verified as reproducible.
          @SinghRajenM has committed a fix that solves all testing scenarios so far.
          the fix is currently in the queue and might get merged, if no further issues or concerns arise.

          best regards.

          1 Reply Last reply Reply Quote 4
          • M
            melle sterk
            last edited by melle sterk May 14, 2019, 3:34 PM May 14, 2019, 3:33 PM

            I had the same problem with a 32-bit version(v.7). I installed this solved my problem 64 v.7.6.4

            M 1 Reply Last reply May 14, 2019, 3:54 PM Reply Quote 1
            • M
              melle sterk @melle sterk
              last edited by May 14, 2019, 3:54 PM

              @melle-sterk I cant edit my prev submission. but I do still have the problem after installing both version. it only looked like it dindt for a second. So ignore my prev message

              1 Reply Last reply Reply Quote 1
              • P
                Paul Renold
                last edited by May 22, 2019, 9:25 AM

                Still seems to be an issue with v7.7

                M 1 Reply Last reply May 22, 2019, 9:35 AM Reply Quote 0
                • M
                  Meta Chuh moderator @Paul Renold
                  last edited by Meta Chuh May 22, 2019, 9:35 AM May 22, 2019, 9:35 AM

                  welcome to the notepad++ community, @Paul-Renold

                  yes, you are correct.

                  a fix has been submitted to address this issue, but it has not been merged into 7.7 for issue strategic reasons, due to the major changes within this release.

                  many thanks and best regards.

                  1 Reply Last reply Reply Quote 2
                  • M
                    Manuel Romeiro
                    last edited by Oct 11, 2019, 4:58 PM

                    I installed the V7.8 32-bit (built time Oct 7 2019 - 00:58:16) and continue not working.
                    Now, there is not prompt, but don’t update the changes.

                    1 Reply Last reply Reply Quote 0
                    • M
                      Manuel Romeiro
                      last edited by Oct 11, 2019, 5:50 PM

                      Improving my last answer.
                      The functionality “tail -f” seams working when data changes and stream is closed, but sometimes not works if the file stream remains opened.

                      I tested it, redirecting java application output to one file (some_java_application > out.log).
                      The Notepad++ only updated at the begin (when file was cleaned) and at the end (when application ends, and file stream was closed).
                      If I disable the “tail -f”, the prompt comes again as expected, when focus in Notepad++ with files changes, even when stream remains opened (that means the Notepad++ have capability to detect changes on files with stream open, but not when “tail -f” enabled).
                      I’ll comment again if I reproduce this with a simple application, but bellow I reproduce partially with native ms-dos applications.

                      After that, I tried to reproduce the problem only using windows base applications, and that works better, but not perfect.
                      Executing the bellow command on the console:
                      ping -t 0.0.0.0 > test_tail_notepad_plus_plus.txt

                      The Notepad++ with “tail -f” enablled only updates when:

                      • At the begin, when file was cleared;
                      • Receiving focus on Notepad++;
                      • Press F5 on Explorer with file folder opened (native file Explorer of windows);

                      There are missing updates on acceptable time for tail functionality, even Notepad++ don’t have focus (for example refresh rates of 1 second).
                      I’m running Notepad++ V7.8 32bit on windows 10 64bit.

                      Thanks
                      Manuel Romeiro

                      R 1 Reply Last reply May 12, 2025, 7:47 AM Reply Quote 0
                      • S
                        SinghRajenM moderator
                        last edited by SinghRajenM Oct 13, 2019, 5:39 AM Oct 12, 2019, 3:48 PM

                        @Manuel-Romeiro it seems these all are windows limitation. It is explained here - https://github.com/notepad-plus-plus/notepad-plus-plus/pull/5591#issuecomment-487341747

                        Refreshing every second could be an option. But it will keep utilizing CPU even if there is no change as well because the monitoring thread has to do polling every second which is against the design of change notification.

                        M 1 Reply Last reply Oct 14, 2019, 8:46 AM Reply Quote 2
                        • S
                          SinghRajenM moderator
                          last edited by Oct 12, 2019, 4:18 PM

                          For reference to all -

                          From MSDN

                          FILE_NOTIFY_CHANGE_SIZE
                          0x00000008

                          Any file-size change in the watched directory or subtree causes a change notification wait operation to return. The operating system detects a change in file size only when the file is written to the disk. For operating systems that use extensive caching, detection occurs only when the cache is sufficiently flushed.

                          FILE_NOTIFY_CHANGE_LAST_WRITE
                          0x00000010

                          Any change to the last write-time of files in the watched directory or subtree causes a change notification wait operation to return. The operating system detects a change to the last write-time only when the file is written to the disk. For operating systems that use extensive caching, detection occurs only when the cache is sufficiently flushed.

                          1 Reply Last reply Reply Quote 2
                          • M
                            Manuel Romeiro @SinghRajenM
                            last edited by Manuel Romeiro Oct 14, 2019, 8:46 AM Oct 14, 2019, 8:46 AM

                            @SinghRajenM Yes, it’s exactly that issue.
                            I’ll continue using the functionality knowing that limitation.
                            Thanks

                            1 Reply Last reply Reply Quote 0
                            • R
                              ryangray01 @Manuel Romeiro
                              last edited by May 12, 2025, 7:47 AM

                              @Manuel-Romeiro said in Monitor (tail -f) prompts to reload file:

                              Improving my last answer.
                              The functionality “tail -f” seams working when data changes and stream is closed, but sometimes not works if the file stream remains opened.

                              I tested it, redirecting java application output to one file (some_java_application > out.log).
                              The Notepad++ only updated at the begin (when file was cleaned) and at the end (when application ends, and file stream was closed).
                              If I disable the “tail -f”, the prompt comes again as expected, when focus in Notepad++ with files changes, even when stream remains opened (that means the Notepad++ have capability to detect changes on files with stream open, but not when “tail -f” enabled).
                              I’ll comment again if I reproduce this with a simple application, but bellow I reproduce partially with native ms-dos applications.

                              After that, I tried to reproduce the problem only using windows base applications, and that works better, but not perfect.
                              Executing the bellow command on the console:
                              ping -t 0.0.0.0 > test_tail_notepad_plus_plus.txt

                              The Notepad++ with “tail -f” enablled only updates when:

                              At the begin, when file was cleared;
                              Receiving focus on Notepad++;
                              Press F5 on Explorer with file folder opened (native file Explorer of windows);
                              There are missing updates on acceptable time for tail functionality, even Notepad++ don’t have focus (for example refresh rates of 1 second).
                              I’m running Notepad++ V7.8 32bit on windows 10 64bit.

                              Thanks
                              Manuel Romeiro

                              The “tail -f” functionality in Notepad++ works as expected when the file stream is closed, but encounters issues when the file stream remains open. I tested this by redirecting the output of a Java application to a file (some_java_application > out.log), and Notepad++ only updated at the beginning (when the file was cleared) and at the end (when the application finished and the stream was closed). However, when the stream remained open, the updates were not consistent. I further tested this with a native Windows command (ping -t 0.0.0.0 > test_tail_notepad_plus_plus.txt), and the updates only occurred when the file was cleared, when Notepad++ regained focus, or when the folder view was refreshed using F5 in Windows Explorer. Updates were missed when the file was actively being written to and Notepad++ didn’t have focus, indicating that Notepad++ can detect file changes while the stream is open, but not reliably with “tail -f” enabled. This behavior is similar to discovering in n out secret menu prices—unexpected yet interesting, but inconsistent. This was tested on Notepad++ v7.8 (32-bit) on Windows 10 (64-bit).

                              PeterJonesP 1 Reply Last reply May 12, 2025, 1:59 PM Reply Quote -2
                              • PeterJonesP
                                PeterJones @ryangray01
                                last edited by May 12, 2025, 1:59 PM

                                @ryangray01,

                                Again, your only contribution in this topic was to reiterate phrases that had already been used in other posts. Please try to include your own unique perspective in posts. You now have two “could be AI nonsense” strikes against you. You are on very thin ice at this point.

                                This was tested on Notepad++ v7.8 (32-bit) on Windows 10 (64-bit)

                                Why would anybody still be using v7.8 (32-bit) on Windows 10 (64-bit) – in 2019, when the original discussion was started, that was reasonable. But 6 years later, when Notepad++ is to v8.8.1, and Windows 10 is at the cusp of end-of-support from Microsoft, I cannot believe you are actually still using that setup, or that there is any benefit today to trying to replicate that 6-year-old setup.

                                1 Reply Last reply Reply Quote 2
                                • First post
                                  Last post
                                The Community of users of the Notepad++ text editor.
                                Powered by NodeBB | Contributors