Fix corrupted txt file (NULL)

  • So I’m back to this thread, hopefully without a pure garbage contribution this time…

    @Ekopalypse said in Fix corrupted txt file (NULL):

    So I could have spent my time with something more productive,
    like watching TV and eating chips

    I think your analysis and “market comparison” was valuable and an interesting read. Put the chips down and turn off the TV.

    So I did a little research and read about how the proposed fix to the issue was rejected because it had too much risk of introducing a regression.

    I find that a tad bit ironic because isn’t a text editor that can lose data by corrupting hours of someone’s work already in a “regressed” state?

    So what’s the future on this?

    Don’s rejected a fix once. AFAICT Don doesn’t keep his “finger on the pulse” of current user concerns (i.e., doesn’t monitor here, doesn’t communicate with people via email about Notepad++). With some of the limited back-and-forth I’ve seen with him in issue comments on github there seems to be a language-barrier problem as well when the communication is in English.

    I just don’t know…

  • @PeterJones ,

    You are more than welcome.

    @Ekopalypse ,

    I thank you too for your great analysis. I find your comparison very interesting.
    Next time just keep the TV ON and the chips on a hand distance so you can combine your favourite activities ;) And make sure to save often ;))


  • Another user with this problem has been reported today on the “Live Support” channel:


    “the big problem with N++”…indeed.

  • I have the same problem. Recuva and other programs did not help. I think data recovery companies can help. How do you think? That file is very important to me.

  • Hi @ben and others
    were you able to resolve this issue? any softwares that can be used? I have the same issue and need to recover a file. using Recuva i have similar experience as others.
    please help me if anybody has resolved this. thanks

  • I suppose I will just keep echoing these here as I happen to notice them, using this thread as a “rallying point”:


  • @Alan-Kilborn
    I don’t think there is a solution for this. I have been looking for it for the past week. Nobody has a working solution. I see NULNUL in my notepad++, if i open it in notepad I see blank file, I was not sure of the original size of the file, but it shows as 13kb which might be smaller or of the same size, if I open it in sublime txt editor it shows all 0000 0000 entries for about 1000 lines. so I guess it may be of the original size. No recover from backup file option, recuva does not help. Not sure if it is due to system crash or malware correupted the file. This is the only file that got corrupted as it was last saved before the crash, none of the other opened up notepad++ files in the same session did not get corrupted. All other files in the backup folder I am seeing it, as I have this file saved in a different location than the notepad++ backup file location. If there is a working proven software I can pay for and will fix this, I will buy that. I do not see anything that is available for txt files.

  • @general-purpose said in Fix corrupted txt file (NULL):

    I don’t think there is a solution for this.

    From my somewhat limited knowledge, I agree.
    Well, except the solution is to prevent it in the future.
    But the change to the s/w for that has been declined, so…

    If there is a working proven software I can pay for and will fix this, I will buy that.

    Well, this would presume that the data still exists.
    If it doesn’t (which I would suspect to be true), sadly nothing can recover it.

  • I am not sure about that but I suspect the file contents might still exist somewhere on the disk.
    I had been thinking about the NUL issue before when I made the fix.
    Why is the file showing only NULs?
    You see, when you save the file, no matter if it is immediately written or partially written or not written to the disk at all, when opened after the crash the file should show some sane data + some corrupted portions. This is not the case.
    One reason would be that the file is wiped (written as all NULs) before the actual write to the disk. This is unlikely however because it contradicts the very reason why the actual content is not immediately written to the disk. Why first write NULs and then write again the new contents?

    The second reason is the file location.
    What we know about the file is its name. But from system point of view it is just an address to the file content. The system keeps in its file system a register - the correlation between the file name and where on the disk its content resides. Now when we save, the name is kept the same, the new content is supposedly written to the disk BUT THE PLACE WHERE IT IS WRITTEN MIGHT DIFFER FROM THE PREVIOUS ONE. In other words the address of the file is changed. This means that the register containing the correlation name - content needs to be updated as well (in the file system itself).
    Now imagine that you save the file, the new address is assigned and updated in the file system (so your file name points to the new location on the disk) BUT your new file content is still not flushed to the disk. The system crashes, you restart, open your file and what you see is the content on the new location (which has some random data or all NULs for example).
    In that case your file old content is perhaps still somewhere on the disk but the correlation between the file name and where that location is is gone.

    Software like Recuva might help by trying to find where that previous location was before the save and the crash but unfortunately it will not always succeed.
    As far as I remember there are some options you need to set in Recuva to maximize your chances for success but I can’t remember them for sure.
    If you haven’t done that already, go through Recuva settings and turn on all of them that imply something like “deep” or “thorough” or “aggressive” scan. It will give you more results you need to check yourself but it might help.
    If it doesn’t help then perhaps there is nothing else you can do.

    Good luck!

  • @pnedev
    I agree with your analysis and reasoning. Thanks for the detailed response. I used Recuva with deep scan. It did not help. As you said nothing much to do at this point.
    lessons learnt.