Notepad++ crashed with NULLs.



  • HI,
    I had a file named Misc.txt. I have been using it since months. I used to add notable points it it, DAILY.
    Today, while adding few lines, my laptop crashed.
    I restarted my system and opened the Notepad++. Other opened files were good. But only Misc.txt was containing all NULL NULL NULL…
    IT HAD REALLY IMPORTANT DATA THAT I COLLECTED SINCE MONTHS!!!
    I tried one solution -
    - Went to %AppData%/Notepad++/plugins/config/NppFTP/Cache. But the path doesn’t exist.

    I can’t see any Notepad++ folder in Program Files.
    The only place I can find Notepad++ is this -
    C:\Users\prabharo\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Notepad++\Notepad++ 6.9.2

    Please please PLEASE help me in recovering my data.

    Note - I used to connect my google chrome to internet using my gmail ID. Can my gmail be of any use??
    Atleast, whatever data I had saved till yesterday is also fine.



  • Unfortunately, you’re not alone. Comptuer crashes can cause unexpected behavior, and so far, no one in the development team has been able to reliably replicate and thus debug how to prevent the problem. This is officially tracked in issue #2381

    Regarding the specifics of your instance: you mentioned checking in %AppData%/Notepad++/plugins/config/NppFTP/Cache… but that’s only used to cache files if you’re using the NppFTP plugin to edit remote files (on your webserver, or similar). The right directory location for Notepad++'s backup (assuming you have Settings > Prefrences > Backup enabled) would be %AppData%\Notepad++\Backup: did you check there? Also, if you used a “local”/portable version (check ? menu > Debug Info, and look for “Local Conf mode:”; if it says ON, then it’s “local”), then the backup directory would be a subdirectory of your whatever directory notepad++.exe is in, rather than in the %AppData% hierarchy.

    Unfortunately, if it’s not there, there’s probably not much we can do to help you recover it. However, you’re luckier than some, if your statement that “whatever data I had saved till yesterday is also fine” means that you did have your own backup somewhere, and that you’ve just lost the most recent edits. (If not, for the future, I highly recommend that you keep a backup of any important data**. This can be done with dedicated backup software, or with storing your files in a service like dropbox or one drive or google drive or similar. Or using version control software, such as git or subversion.)

    History:

    Back in December 2017, @chcg summarized the history of the topic up to that point: https://notepad-plus-plus.org/community/topic/14945/rare-null-write-glitch/2, which @Scott-Sumner updated in January (https://notepad-plus-plus.org/community/topic/15112/attempt-to-recover-files-after-npp-blank-2-files-after-error-missed-the-error-msg/2)

    Since then, there have been at least a few more posts on the issue in this forum (incomplete):

    In March, I posted (https://notepad-plus-plus.org/community/topic/13302/fix-corrupted-txt-file-null/19) that I’d tried to force Windows to crash, but no matter what I did, I could not replicate the NUL-file issue. And @Scott-Sumner had tried the same thing some time earlier, as he revealed in the next post, with the same could-not-repeat-it results). This is a difficult issue to debug, and until someone steps forward with a reliable method of repeating it, it’s probably not going to get fixed.


Log in to reply