Community
    • Login

    Notepad++ just deleted all the text from my files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    40 Posts 9 Posters 6.2k 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.
    • PeterJonesP
      PeterJones
      last edited by

      @Maddock-Emerson said:

      Okay, duly noted

      if you’re willing to stick around and help out: the developers thought they had fixed the NUL-on-crash issue a few releases ago. Which version of Notepad++ were you using when it happened? (? > Debug Info > Copy debug info into clipboard).

      • If it’s an older release, you might want to try to upgrade to v7.7.1, because the newer version might be more reliable.
      • If you were already using the most recent, if you have a reliable way of reproducing the problem, the developers would love to use that methodology to test future fixes.

      don’t trust N+ with anything important.

      Really, I don’t trust any single app, or any single machine, with important data. I use version control software; I use backups. My motto for such things: “save early, save often”.

      If you want a little help from inside Notepad++, you might want to look into the backup settings, especially simple backup-on-save, which will make a .bak every time you hit save, so your most-recent-minus-one should always be saved alongside your most-recent. Since it should use the file-copy features, rather than npp/scintilla-save-buffer-to-disk process, it might not run across the same race-condition that appears to be happening with crashes (or OS-update-reboots).

      There’s also the Auto-Save plugin (available through Plugins > Plugins Admin), which might help you.

      Alan KilbornA 1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @PeterJones
        last edited by

        @PeterJones said:

        If you want a little help from inside Notepad++, you might want to look into the backup settings

        Wasn’t it suspected at one time that a backup setting turned on might increase the likelihood of the NUL problem occurring? If that was/is true, it might be considered a dangerous recommendation. ;)

        EkopalypseE 1 Reply Last reply Reply Quote 0
        • EkopalypseE
          Ekopalypse @Alan Kilborn
          last edited by Ekopalypse

          @Alan-Kilborn said:

          Wasn’t it suspected at one time that a backup setting turned on might increase the likelihood of the NUL problem occurring?

          but then @pnedev did some digging and found the culprit and it got fixed.
          Not sure, think it was 7.5.9 or so.

          Update: yep it was 7.5.9

          Alan KilbornA 1 Reply Last reply Reply Quote 1
          • Alan KilbornA
            Alan Kilborn @Ekopalypse
            last edited by

            @Ekopalypse said:

            Not sure, think it was 7.5.9 or so.

            So I guess we suspect that @Maddock-Emerson is running an earlier version still? Hmmm…he didn’t say and we didn’t ask. How about it Maddock?

            Maddock EmersonM 1 Reply Last reply Reply Quote 1
            • Maddock EmersonM
              Maddock Emerson @Alan Kilborn
              last edited by

              @Alan-Kilborn 7.7.1

              I got it a few months ago when I was considering the novel and wanted a free text app with more features and better appearance than Windows NP.

              1 Reply Last reply Reply Quote 2
              • Alan KilbornA
                Alan Kilborn
                last edited by Alan Kilborn

                @Ekopalypse said:

                but then @pnedev did some digging and found the culprit and it got fixed…(in 7.5.9)

                I said:

                and we didn’t ask

                Peter, actually you did ask for version info!

                @Maddock-Emerson said:

                7.7.1

                Well, this thread sounds like some pretty good evidence that it is NOT fixed in the current 7.7.1, or at least not fixed for all circumstances which could cause it to occur. I’m sad. :(

                1 Reply Last reply Reply Quote 1
                • PeterJonesP
                  PeterJones
                  last edited by

                  @Alan-Kilborn said:

                  good evidence that it is NOT fixed in the current 7.7.1

                  Urgh. We had all hoped that problem was behind us.

                  I’ve opened #6133 and @-mentioned @pnedev both there are here. Hopefully, since he provided the previous fix, he might know the right questions to ask to see what more can be done.

                  In the mean time, @Maddock-Emerson , could you post your full ? > Debug Info > Copy debug info into clipboard. Also, if you haven’t changed your Settings > Preferences since the NUL-file incident, it might be good to share a screenshot of the Settings > Preferences > Backup (just in case, as @Alan-Kilborn suggested, it had to do with backup settings) – upload to a server like imgur, and embed using the syntax ![](http://i.imgur.com/QTHZysa.png) – making sure it’s the URL to the raw image file (with the .png or .gif or .jpg extension, usually found via clicking on the image and “get direct link”, or easier by putting ! in front of the “markdown link” if you’re logged in; if you’re posting anonymously, you’ll have to click on the image’s … > Get Share Links, then extract the URL from the BBCode instance, which is the only anonymous share-link that shows the underlying image URL). Maybe even make a copy of all of the %AppData%\Notepad++\*.xml config files, and be ready to share them if @pnedev thinks they will be useful.

                  Maddock EmersonM 1 Reply Last reply Reply Quote 0
                  • Maddock EmersonM
                    Maddock Emerson @PeterJones
                    last edited by Maddock Emerson

                    @PeterJones
                    Okay wait, what exactly do you need and how do I get it? I’m seeing a lot of technical terms and symbols thrown out in that comment and I’m not sure what it all is. I’m also tired and possibly drunk because I spent the last like 20 hours making chili with red wine, so if you could just explain it like I’m 5 yeahhhh that’d be great

                    rinku singhR 1 Reply Last reply Reply Quote 0
                    • rinku singhR
                      rinku singh @Maddock Emerson
                      last edited by

                      @Maddock-Emerson said:

                      red wine

                      Notepad++ v7.7.1 (32-bit)
                      Build time : Jun 16 2019 - 21:14:50
                      Path : C:\Program Files\Notepad++\notepad++.exe
                      Admin mode : OFF
                      Local Conf mode : OFF
                      OS : Windows 7 (32-bit)
                      Plugins : 3P.dll ColorPicker.dll Console_output.dll HexEditor.dll Hex_2_binary.dll JSMinNPP.dll mimeTools.dll NppConverter.dll NppExport.dll NppPluginDemo.dll Remove_dup_lines.dll

                      1 Reply Last reply Reply Quote 0
                      • PeterJonesP
                        PeterJones
                        last edited by

                        @Maddock-Emerson said:

                        Okay wait, what exactly do you need and how do I get it

                        By ? > Debug Info > Copy debug info into clipboard, I meant, "go to the ? menu in Notepad++, select the Debug Info menu entry, and then click on Copy debug info into clipboard, which will copy the kind of info that @gurikbal-singh pasted. You would then come over to your browser widow, reply to this post, and paste it in.

                        By showing us the Settings > Preferences > Backup, you would go to the Settings menu, pick the Preferences entry, then in the far-left list of words, select Backup, which will take you to the backup settings for Notepad++. Use Alt+PrintScreen to grab a screenshot. Paste that screenshot into mspaint.exe, or your favorite simple graphics program, save the file to your computer. Then go to imgur.com or other similar image-sharing site, upload your image, find the URL for the picture (I already explained how in imgur’s interface). Then come to your reply, and embed the code ![](http://i.imgur.com/QTHZysa.png), where you replace the URL I supplied with the URL to your image. You’ll know you’ve done it right by looking in the PREVIEW window while you’re typing your reply, and you’ll be able to scroll around and see the image embedded.

                        By “make a copy of all the %AppData%\Notepad++\*.xml config files”, I meant: open Windows Explorer, paste %AppData%\Notepad++\ into the explorer navigation field, then select all the *.xml files, and copy them to some other location, where you know where they are. If @pnedev asks for them, you’ll be able to zip them up, and figure out some location that you can share those files with @pnedev, if it will help him in his debug.

                        Maddock EmersonM 1 Reply Last reply Reply Quote 0
                        • Maddock EmersonM
                          Maddock Emerson @PeterJones
                          last edited by

                          @PeterJones
                          Notepad++ v7.7.1 (32-bit)
                          Build time : Jun 16 2019 - 21:14:50
                          Path : C:\Program Files (x86)\Notepad++\notepad++.exe
                          Admin mode : OFF
                          Local Conf mode : OFF
                          OS : Windows 10 (64-bit)
                          Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll

                          Okay, I think I’ve done everything right? I’m getting very close to 24 hours without sleep though so I’ll check back way later

                          1 Reply Last reply Reply Quote 2
                          • PeterJonesP
                            PeterJones
                            last edited by

                            @Maddock-Emerson said:

                            Okay, I think I’ve done everything right?

                            Yes, that’s what we were asking for. Thanks!

                            Hopefully, @pnedev (or another developer) will be able to look into this.

                            1 Reply Last reply Reply Quote 1
                            • pnedevP
                              pnedev
                              last edited by

                              Hello @Maddock-Emerson ,

                              Thank you for reporting this and for the info. I’m really sorry for your data loss.

                              Hello all,

                              I did some fixes back then that could cause data loss when backup was enabled.
                              However this issue is very difficult to reproduce thus it was not possible to verify it was completely fixed. Unfortunately now it is clear that’s not the case.
                              I’ll look into this again to see if I’ll find something else.

                              1 Reply Last reply Reply Quote 1
                              • EkopalypseE
                                Ekopalypse
                                last edited by

                                @pnedev - I not convinced that this issue is anyhow related to what you’ve fixed in the past.

                                I’ve researched the past incidents and I didn’t find a single report that mentioned the
                                same behavior as this one.
                                Neither the loss of themes nor that all files opened got corrupted.

                                The weird thing here, beside the loss of the theme and the files opened in the past is
                                the corruption of all files. How could this be? Npp opens the files, except for the
                                initial reading, only if it needs to write something, aka the user saves the file,
                                otherwise it would create a backup of that file. (given from the configuration from the OP)

                                This incident here, from my point of view, is very different and unique.

                                Alan KilbornA 1 Reply Last reply Reply Quote 3
                                • Alan KilbornA
                                  Alan Kilborn @Ekopalypse
                                  last edited by Alan Kilborn

                                  @Ekopalypse said:

                                  The weird thing here…is the corruption of all files.

                                  Memory is weak, but from prior discussion of this issue I seem to recall that people complained of files that were changed during the current run of Notepad++ were the ones that got stuffed with NULs.

                                  For example, if your “remembered” session contains 5 files, and during the current session (the one with the thing that causes the NUL corruption) you’ve only worked on 3 of those files, only those 3 would be NULlified.

                                  So, it is conceivable that the OP on this thread here had worked on all of his files when the oddity manifested, trashing all of them. Just a supposition.

                                  EkopalypseE 1 Reply Last reply Reply Quote 3
                                  • EkopalypseE
                                    Ekopalypse @Alan Kilborn
                                    last edited by Ekopalypse

                                    @Alan-Kilborn

                                    Memory is weak, but from prior discussion of this issue I seem to recall that people complained of files that were changed during the current run of Notepad++ were the ones that got stuffed with NULs.

                                    Or my research wasn’t good enough. If this was the case then, yes, …
                                    But I’m still don’t understand how this could happen.
                                    I understand if you haven’t saved it, that the “backups” might get corrupted but
                                    if a file on disk has been opened in npp it wouldn’t be affected by a defunct backups functionality wouldn’t it?
                                    My understand how this works is

                                    • initial read of the file if opened from filesystem

                                    • make changes in the editor but do not save

                                    • having the configs from OP results in backup files after 7 seconds

                                    • go on and make further changes - backups do get changed as well

                                    • save the file

                                    • npp opens the file for writing the changes and then deletes the backup file

                                    So how could all files, edited by Npp, from the filesystem get corrupted by this mechanism?
                                    Only if I would say save all open files and something prevents from closing it while
                                    shutting down the machine. Sounds very strange to me. Just to make sure, I do NOT
                                    say that OP is lying - I just don’t understand how this could happen.

                                    Alan KilbornA 2 Replies Last reply Reply Quote 4
                                    • Alan KilbornA
                                      Alan Kilborn @Ekopalypse
                                      last edited by

                                      @Ekopalypse said:

                                      how could all files, edited by Npp, from the filesystem get corrupted by this mechanism?

                                      Well that’s the big question, isn’t it? :)

                                      EkopalypseE 1 Reply Last reply Reply Quote 2
                                      • EkopalypseE
                                        Ekopalypse @Alan Kilborn
                                        last edited by

                                        @Alan-Kilborn

                                        I’m quite good in asking obvious questions :-D

                                        1 Reply Last reply Reply Quote 1
                                        • Alan KilbornA
                                          Alan Kilborn @Ekopalypse
                                          last edited by

                                          @Ekopalypse said:

                                          I do NOT say that OP is lying

                                          Right. OP is sincere and is not trolling. I’m fairly sure the NUL thing happened to me once a long time ago (before I even knew about this forum) in a minor way (one file that was unimportant got NULlified after a strange crash). I did not recognize it as anything but a curious weirdness at the time. But now I pay attention when someone mentions NUL and does not mean opening a binary file.

                                          1 Reply Last reply Reply Quote 3
                                          • rinku singhR
                                            rinku singh
                                            last edited by

                                            NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL

                                            as about 10 months ago i got same problem but in different condition(while saving there changes to .nova files as request i got admin mode but all open files changes into NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL NUL

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