• Login
Community
  • Login

Fix corrupted txt file (NULL)

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
corruptedfixtextnullfile
114 Posts 37 Posters 145.0k 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.
  • A
    Alessandro Lo Cuoco
    last edited by Alessandro Lo Cuoco Jun 5, 2018, 10:36 AM Jun 5, 2018, 10:33 AM

    It seems that when data is apparently replaced by null characters information is not actually lost. I searched on the web and I found that using a file recovery application (Recuva) one can still obtain the original file without any loss of information (I tried this myself). This is very strange, as it’s not clear where this information come from if the “null” characters are really “null”…

    1 Reply Last reply Reply Quote 0
    • C
      chcg
      last edited by Jun 5, 2018, 12:01 PM

      @Claudia-Frank @pnedev
      See https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/CMakeLists.txt and https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/PowerEditor/gcc
      for cross compilation. Open PRs needed:
      https://github.com/notepad-plus-plus/notepad-plus-plus/pull/4320
      https://github.com/notepad-plus-plus/notepad-plus-plus/pull/3918
      https://github.com/notepad-plus-plus/notepad-plus-plus/pull/4145

      C 1 Reply Last reply Jun 5, 2018, 1:15 PM Reply Quote 1
      • C
        Claudia Frank @chcg
        last edited by Jun 5, 2018, 1:15 PM

        @chcg

        thank you but since installing VS2017 in my VM it is good enough.
        It does take <1 minute to do a full clean compile of npp, scintilla and python script plugin
        and ~15-20 seconds for code changes to test.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • M
          Manikandan Palaniappan
          last edited by Manikandan Palaniappan Jun 5, 2018, 5:35 PM Jun 5, 2018, 5:34 PM

          Hi All,
          In my case, file size is showing 7kb and unable to find that file in back up folder. When I open it shows Null in Notepad++, empty in Notepad.
          I tried Recuva and restore the file, again context is not readable.
          Restore previous version is also not available. I’m using Windows 10 64 bit OS
          Please help me to recover file

          Thanks,
          Mani

          1 Reply Last reply Reply Quote 1
          • I
            Iain Cheyne
            last edited by Jun 12, 2018, 8:36 AM

            I fixed a corrupted file using the deep scan feature of Recuva.

            1 Reply Last reply Reply Quote 0
            • R
              Rahul Arora
              last edited by Jun 14, 2018, 9:13 PM

              for anyone still looking for this!
              right click on the file -> properties -> previous versions, -> open, …
              check contents before you hit restore.
              saved 7 days of work!!!

              1 Reply Last reply Reply Quote 1
              • J
                Joe Dougherty
                last edited by Jul 27, 2018, 1:12 AM

                Anyone know if this has been fixed? I’m using an older version 7.3.3 64-bit version on Windows 10. Its always been solid. After my last two reboots the files I had been working on previously have turned into all null bytes. Not empty files - each character in the file is now null. Major PITA.

                S 1 Reply Last reply Jul 27, 2018, 3:05 PM Reply Quote 1
                • S
                  Scott Sumner @Joe Dougherty
                  last edited by Jul 27, 2018, 3:05 PM

                  @Joe-Dougherty said:

                  Anyone know if this has been fixed?

                  I have seen no evidence that any changes have been made to date in regard to preventing this from occurring. It happened to me when using 7.2.2.

                  1 Reply Last reply Reply Quote 0
                  • M
                    Mark Cage
                    last edited by Mark Cage Jul 31, 2018, 6:33 AM Jul 31, 2018, 6:33 AM

                    Had the same catastrophe today. System Crashed (windows 7). Npp ver. 6.9.

                    Text file contents coming as null.

                    Used the recuva technique and got everything back!!

                    Learnt about verbose backup and updating to the latest Npp version.

                    Thank you all.

                    S 1 Reply Last reply Jul 31, 2018, 11:52 AM Reply Quote 0
                    • S
                      Scott Sumner @Mark Cage
                      last edited by Jul 31, 2018, 11:52 AM

                      @Mark-Cage said:

                      …updating to the latest Npp version

                      Most people in your situation say something different…Like “I’m switching to Sublime / Atom”…

                      1 Reply Last reply Reply Quote 1
                      • M
                        Mark Cage
                        last edited by Aug 1, 2018, 1:38 AM

                        @Scott-Sumner said:

                        Sublime / Atom

                        I love npp! There might some issues in the other text editors as well

                        Just enable verbose backup and i think i should be fine :)

                        S 1 Reply Last reply Aug 1, 2018, 12:09 PM Reply Quote 1
                        • S
                          Scott Sumner @Mark Cage
                          last edited by Aug 1, 2018, 12:09 PM

                          @Mark-Cage

                          Just enable verbose backup and i think i should be fine

                          There are some people with the theory that that actually contributes to the NUL problem (i.e. they postulate that if backup was off it wouldn’t/couldn’t occur). I can attest that the one time the NUL problem happened to me, I did indeed have verbose backup turned on. I had a bunch of files that the v.b. creates (so I thought "No problem!), but they too were all filled with NUL, back to the time at which I had started the current Notepad++ run. I lost about 2 hours of work when I should have only lost about 2 seconds worth (I am old-school and am “all over” the Save key…constantly). YMMV. :-)

                          1 Reply Last reply Reply Quote 3
                          • M
                            Mark Cage
                            last edited by Aug 3, 2018, 9:40 AM

                            That sucks! i hadn’t turned back up on before this happened . Also use the save key all the time. But the null error still occurred. Can only pray that it doesn’t happen again :)

                            1 Reply Last reply Reply Quote 0
                            • L
                              Lucky Erumebor
                              last edited by Aug 5, 2018, 10:27 PM

                              same thing just happened to me… v7.5.8

                              1 Reply Last reply Reply Quote 0
                              • C
                                Claudia Frank
                                last edited by Aug 21, 2018, 8:21 PM

                                Gotcha!!

                                Hopefully I can reproduce it under debugger.

                                Cheers
                                Claudia

                                1 Reply Last reply Reply Quote 4
                                • Jeremy JordanJ
                                  Jeremy Jordan
                                  last edited by Aug 22, 2018, 11:11 PM

                                  yeah but this is more corrupted because my txt file named Oofood instead of saying words… it came up with this: ¶¬®°~Z…yàãñöpý²Ã”¦ Vš¸:lŸã"Œ7$2¥‰+s;¡*p“‘A\ìö© /2[ÐnUû“H–™øk´­b|Ë*Y÷T¾t=¥t˜»¤RÞ~YP6*•°ÉÜü´ÄZ¤ï°³Ê}=ƒ0såÁ¨,©°¯Îß”1XŽÁb€(Þ}Y4ýµB™yª
                                  @¶e§‹Ê ©öà[_dy ‘rü±wD˜ŒíÝP ÉïCŸ;Q¬|it³JÔÈX5[7Dë¹ã!ä•0ynöWª@»C²É;]C„rÏ<õª—$5ûUôdx3×2`ö¦3õÆš&ÛgpÖǝ$³:Þ"АµÙ&¹ŠQâ‚zg¾ðõ^5öŽ(^³Eð«N\§DFNi†“»©˜.Ù/ã« &æ-”&ÚÏŠû²š¢ÔÿÐØ0\m;B–@8ÍÛv¶ïË‘®xJU ´ ôP
                                  
                                  ’Ð 6ÝÁ¤ªÀ½4;X¶y•kÕñ”ø¡ÇéVËè×_ýÔÇ9|E’Xújƒ /6O´ûv øEî\ê±s5T)%,T,Âa†L c£"ÇÕz ˆ ¯îêjøRÖÓ:òo›7ÆÓGmyEU¶Xo‘Å«·øÈëJõ¾Äwå¦B<\©¶ÖÙâÎ,@´~_Nä&BkBc&AŽ…Zºc

                                  C 1 Reply Last reply Aug 23, 2018, 12:14 PM Reply Quote 0
                                  • C
                                    Claudia Frank @Jeremy Jordan
                                    last edited by Aug 23, 2018, 12:14 PM

                                    @Jeremy-Jordan

                                    but this looks like the file content has been replaced with binary data - hard to believe that npp is responsible for that.
                                    I assume that your issue must be caused by something else.

                                    Cheers
                                    Claudia

                                    1 Reply Last reply Reply Quote 1
                                    • PeterJonesP
                                      PeterJones
                                      last edited by Aug 23, 2018, 1:50 PM

                                      @Jeremy-Jordan,

                                      As @Claudia-Frank said, that’s binary data, not just NULLs. If that’s really happened to a file that was plain text, you’ve either edited it with some other editor which has encoded it, or the file has been encrypted. If you weren’t expecting the file to be encrypted, then there’s (unfortunately) a very high probability you’ve been infected with a virus, ransomware, or other malware. Please run a reputable scanner ASAP.

                                      Since many forms of viruses, ransomware, and other malware make your data unrecoverable, I am hoping you have a separate backup of any essential data. But don’t try to access that backup until you know the computer you are on is clean – I’d hate for your backup to become infected as well.

                                      1 Reply Last reply Reply Quote 2
                                      • Michael SimcichM
                                        Michael Simcich
                                        last edited by Aug 27, 2018, 6:15 PM

                                        I have an interesting variation on a theme to report. Yesterday I worked most of the day on a set of text files; some xls files, and asp.net files loaded into visual studio. Most work was done by 9 pm; I had saved those files many times during the day’s work. At about 11:30 pm the pc became increasingly unresponsive and eventually I had to reset it. The pc booted normally. I left it on all night so that the daily Acronis backup, which seemed to have stalled in the evening (and may have been the source of the system failure) could do it’s thing.

                                        This AM I found that all of those files (.net, .xls, .txt in notepad++) were corrupted, with the text and .net files showing as NULL everywhere. I don’t have Backup on Save turned on. Session snapshot and periodic backup are on, probably default settings as I’ve never known about np++ backup features before today, but there are no recent files in that dir. I have various types of backups to fall back on.

                                        But the main reason I’m posting this is that the NULL blowout happened to other files that were not in use by notepad++. I personally don’t recall ever having file data losses like this before, ever; but it doesn’t seem to be true that it’s an issue with notepad++, or at least only notepad++.

                                        C 1 Reply Last reply Aug 28, 2018, 11:49 AM Reply Quote 2
                                        • C
                                          Claudia Frank @Michael Simcich
                                          last edited by Claudia Frank Aug 28, 2018, 11:51 AM Aug 28, 2018, 11:49 AM

                                          @Michael-Simcich

                                          you are right, this issue can happen with any software if the requirements are fulfilled.
                                          Basically it is this, a thread has opened the file and then something happens which forces
                                          the operating system to kill the process. In this situation a thread might not be able to close
                                          the file correctly which then results in a corrupted file.

                                          I’m able to reproduce this with a 32bit npp version and file around ~100MB where backup is enabled and
                                          the system is under load. If, for example, I would convert everything to uppercase,
                                          under this condition, ~1 out of 10 times npp freezes, dies and backup file only is corrupted.
                                          But if you restart npp, then it looks like the real file is corrupted, just because npp loaded the backup file as it wasn’t saved correctly at this time.
                                          Unfortunately I wasn’t able to reproduce this behavior running npp under the debugger and
                                          haven’t found out yet whether the cpu, memory or io load or a combination of those is needed
                                          to reproduce it. This happens, for me, only on a 32bit version of npp with activated backup,
                                          on a 64bit version I was not able to reproduce this behavior, even with larger files. Tested with 1GB.

                                          Cheers
                                          Claudia

                                          Michael SimcichM 1 Reply Last reply Aug 28, 2018, 1:58 PM Reply Quote 4
                                          • First post
                                            Last post
                                          The Community of users of the Notepad++ text editor.
                                          Powered by NodeBB | Contributors