• Login
Community
  • Login

Rare Null Write Glitch

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
19 Posts 7 Posters 10.3k 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.
  • S
    Samuel Cool
    last edited by Dec 19, 2017, 1:55 AM

    I was just working on a css file, and I think I hit ctrl+shift+s for a save all, and suddenly the file blanked out, and I quickly found out that it had cleared everything somehow, then saved, or something like that. But the end result: I lost the entire file, no getting it back. I have a backup, but it’s pretty old, I might as well rewrite it all.

    If anyone can find the bug that caused this, and save others from the same fate, I’d be grateful.

    -Samuel

    A 1 Reply Last reply Dec 20, 2017, 1:40 AM Reply Quote 1
    • C
      chcg
      last edited by Dec 19, 2017, 6:11 PM

      Unfortunately this is seems to be a not to seldom problem, see e.g.
      https://notepad-plus-plus.org/community/topic/14512/crash-then-current-file-empty
      https://notepad-plus-plus.org/community/topic/14623/np-7-5-1-version-crashed-and-data-lost
      https://notepad-plus-plus.org/community/topic/14463/i-have-lost-my-html-file-data-after-notepad-crashed-while-i-am-unable-to-find-the-any-backup-file-of-that-date-of-my-file-in-notepad-backup-directory
      https://notepad-plus-plus.org/community/topic/14313/how-can-i-restore-my-old-backup-files
      https://notepad-plus-plus.org/community/topic/14294/notepad-crashed-i-lost-all-data-in-a-file

      , but typically that happens in relation with a N++ or OS crash.

      C 1 Reply Last reply Dec 19, 2017, 6:33 PM Reply Quote 0
      • C
        Claudia Frank @chcg
        last edited by Dec 19, 2017, 6:33 PM

        @chcg

        I guess this needs to be divided into, at least, two different issues.
        One which causes the file to be erased and the other resulting in a NULL-filled file.

        If the file is completely empty this could lead to the assumption that the file
        was opened and before flushing the content the write operation was interrupted.
        Either by os shutdown, process dying etc…
        This kind of issue cannot be prevented in a 100% guaranteed way.

        The other issue where a file is filled with NULLs is a little bit strange as it is not clear
        why this happens at all. I’m suspecting backup functionality but because I haven’t found a
        way to prove this it still could mean I’m wrong.

        Recently I started investigating what could be done to find out under which circumstance
        a file will be filled with NULLs but, unfortunately, haven’t yet found a secure way for monitoring
        this.

        Cheers
        Claudia

        S 1 Reply Last reply Dec 22, 2017, 11:20 AM Reply Quote 3
        • A
          Alan Kilborn @Samuel Cool
          last edited by Dec 20, 2017, 1:40 AM

          @Samuel-Cool said:

          rare null write

          suddenly the file blanked out,

          cleared everything somehow

          What is “null write”, “blanked out”, “cleared everything”? Such a serious thing deserves a better bug report if it is to get addressed.

          And a backup that is “pretty old” is no backup at all. That’s on you, not Notepad++.

          Sorry to be brutal…facts are facts.

          S 1 Reply Last reply Dec 22, 2017, 11:54 AM Reply Quote 1
          • S
            Samuel Cool @Claudia Frank
            last edited by Dec 22, 2017, 11:20 AM

            @Claudia-Frank To be clear, the file became 0kb. It literally has nothing int it.

            1 Reply Last reply Reply Quote 2
            • S
              Samuel Cool @Alan Kilborn
              last edited by Dec 22, 2017, 11:54 AM

              @Alan-Kilborn I realize having only an old backup is my fault. I assure you, I won’t be making that mistake twice.

              1 Reply Last reply Reply Quote 1
              • S
                Samuel Cool
                last edited by Dec 22, 2017, 12:24 PM

                The current file blanked out while I was looking at it when I tried to save all, so it’s definitely notepad++'s fault.

                C 1 Reply Last reply Dec 22, 2017, 12:40 PM Reply Quote 1
                • C
                  Claudia Frank @Samuel Cool
                  last edited by Dec 22, 2017, 12:40 PM

                  @Samuel-Cool

                  may I ask, you used save all to save all open files or just save to save the current file or
                  you used save all but only one file was opened at that time?

                  If you used save all for all open files, were additional files affected or only this one?
                  Btw. do you use npp’s backup functionality and if so, what is the configuration?

                  Cheers
                  Claudia

                  1 Reply Last reply Reply Quote 1
                  • S
                    Samuel Cool
                    last edited by Samuel Cool Dec 22, 2017, 12:58 PM Dec 22, 2017, 12:56 PM

                    @Claudia-Frank I had two files opened, css file was the one deleted, and an html file on the tab to the right, which was unaffected.

                    I use the plugins Autosave and Autosave 2, but only after this happened, no other backup functionality is set up.

                    C S 2 Replies Last reply Dec 22, 2017, 1:01 PM Reply Quote 0
                    • C
                      Claudia Frank @Samuel Cool
                      last edited by Dec 22, 2017, 1:01 PM

                      @Samuel-Cool

                      … and you used save all or just save in this case?
                      Was there anything to save for the html file or was it not modified at that time.

                      Btw. could you post the debug-info? (available under ? menu)

                      Cheers
                      Claudia

                      S 1 Reply Last reply Dec 22, 2017, 3:16 PM Reply Quote 0
                      • S
                        Scott Sumner @Samuel Cool
                        last edited by Scott Sumner Dec 22, 2017, 1:13 PM Dec 22, 2017, 1:12 PM

                        @Samuel-Cool said:

                        I use the plugins Autosave and Autosave 2

                        Maybe it is Autosave’s fault…somehow…?
                        Saving right at the instant the user does…maybe an interaction?
                        Hmmm…
                        Just a thought…

                        S 1 Reply Last reply Dec 22, 2017, 3:17 PM Reply Quote 0
                        • S
                          Samuel Cool @Claudia Frank
                          last edited by Dec 22, 2017, 3:16 PM

                          @Claudia-Frank Notepad++ v7.5.3 (32-bit)
                          Build time : Dec 5 2017 - 10:45:46
                          Path : C:\Program Files\Notepad++\notepad++.exe
                          Admin mode : OFF
                          Local Conf mode : OFF
                          OS : Windows 7 (32-bit)
                          Plugins : AutoSave.dll autosave2.dll DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll NppFTP.dll PluginManager.dll

                          I used save all, the html file likely hadn’t been modified recently.

                          By the way, this happened before updating, I think I was in 7.4. I think it’s worth noting that the 7.4.1 release log says “The opened zero length file not saving bug.” was found, possibly related.

                          C 1 Reply Last reply Dec 22, 2017, 3:30 PM Reply Quote 0
                          • S
                            Samuel Cool @Scott Sumner
                            last edited by Dec 22, 2017, 3:17 PM

                            @Scott-Sumner I didn’t have those plugins installed at the time.

                            1 Reply Last reply Reply Quote 1
                            • C
                              Claudia Frank @Samuel Cool
                              last edited by Dec 22, 2017, 3:30 PM

                              @Samuel-Cool

                              Just to summarize what happened

                              Npp most likely version 7.4
                              Using no npp backup functionality and no plugins which do backup files at that time.
                              When pressing save all the entire current active file got erased, other files weren’t
                              affected although it might be that other files haven’t had any modification at that time.
                              Npp kept running - no crash or npp restart.

                              Correct?

                              Cheers
                              Claudia

                              S 1 Reply Last reply Dec 22, 2017, 3:49 PM Reply Quote 0
                              • S
                                Samuel Cool @Claudia Frank
                                last edited by Dec 22, 2017, 3:49 PM

                                @Claudia-Frank Correct.

                                1 Reply Last reply Reply Quote 0
                                • kingtlsK
                                  kingtls
                                  last edited by Jan 19, 2018, 12:46 AM

                                  @Claudia, just to confirm I encountered the same just two days ago. I still have NPP open as I am still trying to find a way to see if there is any chance to recover my files (2x).

                                  I believe there are TWO issues here:

                                  1. npp sudden nulling / blanking of file(s) when there is nothing going on (was in the meeting, not using laptop at the time)
                                  2. backup mechanism not working

                                  here is my debug-info:

                                  Notepad++ v7.5.1 (64-bit)
                                  Build time : Aug 29 2017 - 02:38:44
                                  Path : C:\Program Files\Notepad++\notepad++.exe
                                  Admin mode : OFF
                                  Local Conf mode : OFF
                                  OS : Windows 7 (64-bit)
                                  Plugins : mimeTools.dll NppConverter.dll

                                  I had posted details info here:
                                  https://notepad-plus-plus.org/community/topic/15112/attempt-to-recover-files-after-npp-blank-2-files-after-error-missed-the-error-msg

                                  ps: @Allan, it is not a user’s fault

                                  1 Reply Last reply Reply Quote 1
                                  • G
                                    Gogo Neatza
                                    last edited by Jan 19, 2018, 4:23 AM

                                    It seems to me that more people with “Local Conf mode : OFF”
                                    are having this kind of trouble than the others.

                                    C 1 Reply Last reply Jan 19, 2018, 12:59 PM Reply Quote 1
                                    • C
                                      Claudia Frank @Gogo Neatza
                                      last edited by Jan 19, 2018, 12:59 PM

                                      @Gogo-Neatza

                                      I assume this is because it is the default setting.
                                      But who knows.

                                      @kingtls

                                      So it seems there are three types of a similar issue.

                                      1. left file completely blank
                                      2. left file fill with null char
                                        but both happened with a crash of npp beforehand and
                                      3. left a file with blanks but npp kept running.

                                      Cheers
                                      Claudia

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        chcg
                                        last edited by Jan 25, 2018, 5:18 PM

                                        See https://github.com/notepad-plus-plus/notepad-plus-plus/issues/2883#issuecomment-360502864 might be interesting:

                                        After a Notepad++ crash with nullified file(mostly after save the file), you can try to restart notepad++! by executing the .exe directly. It comes up with a message that ‘another program changed your nullified file’ and it will ask to reload the file. DON’t reload (it is nullified in the original map) but after give your answer (DON’t reload) Notepad++ comes up with the nullified file: magical is not? Somewhere in memory it is keep alive!!
                                        Hopefully this saved other people some headaches!! It was for me.

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