Fix corrupted txt file (NULL)
-
I am sorry for your data loss.
As a reminder, people in this forum are here because we are users of Notepad++, and want to talk about it and/or help other users. But that’s as far as it goes. We are not necessarily developers. (Most of the active devs don’t frequent the forum. And all of the active devs, including the owner, do their development without any renumeration taken from the $0 that you paid for a license to this software.)
Everyone involved in this problem has done their best. But no one – not one of the users that has complained, and not one of the developers who has tried to debug it – has been able to come up with a sequence of events that is guaranteed to replicate the problem every time. And until someone has a foolproof test case, it is impossible to know for sure whether or not any given fix will eliminate the problem. So, barring that, the developers have to study the data that is available to them, and do the best to fix the problems visible in the data they can see. And what is known is that since the caching fix was implemented, the number of complaints about the problem has gone down an order of magnitude or more.
However, when people say “my last backup was August 2020”, I wonder whether they understand the volatile nature of computers, drives, etc. See my reminder from Jun 15 (above): Data loss is possible, even when you are paying hundreds of dollars per license. And backups are relatively cheap, and worth every penny you spend. “Backup early, backup often. Commit early, commit often.” Maybe make this your personal rule for backup: “Would I complain to the author/dev-team/support-team of an application if I thought the application caused me to lose this piece or this section of data? If I care about the data enough to complain after it’s gone, I should care enough to back it up before it’s gone.”
And given that you had previously lost data 7-8 years ago, I am surprised you didn’t learn your lesson and take an active role in frequent backups already. But since you hadn’t, I highly recommend backing up more frequently than every 6 months.
I personally use multiple levels of b backup on most stuff (the every-15min changes-based offsite backup that work supplies, plus once a day archiving certain files to a second location at work, which is also backed up externally after that; and on files/data that I truly care about, I also use version control software to be able to track changes and be able to go back in time as far as I need to.
why it writes NULLs in like that? This is insane.
You can refuse to believe it all you want, but there is nothing in the Notepad++ codebase that is writing a file with all NULLs. Notepad++ is sending the bytes of the file to the OS through the low-level file-writing commands, and the OS appears to be allocating space for the file in a NULL’d section of the filesystem, and then (in its own sweet time) flushing the data to the disk. As far as anyone can tell (and @pnedev knows more about the internals of this than anyone, despite your disagreement with his conclusions), Notepad++ has done everything it can to write the file to the filesystem, and it is the OS that hasn’t completed the job. And no amount of “check status after writing” or other such suggestions that are often bandied about by users who have never looked into the details of the implementation will prevent the error from happening if you have told the OS to write the file to disk, but the OS crashes before the write has occurred/completed.
Why part of the file, while not all file?
Your report is the first time in my 5+ years in this forum of hearing of a partial data loss. It’s always been “all NULL”, or no complaint.
P.S. Win7, NPP 7+.
Wait, what?! As MS says, “Support for Windows 7 ended on Jan 14, 2020”. Good luck with that system in the future.
And “NPP 7+” is a rather imprecise Notepad++ version number – there is no release of Notepad++ with that name. The most-recent fix for NULL was in v7.9.1 – and there have been a lot of versions between v7.0 and v7.9.1. So, precisely, were you actually in a version that was at least v7.9.1 when the problem occurred? Use the ? > Debug Info if you are unsure. Because if you weren’t in at least v7.9.1, then you have no evidence whether or not v7.9.1’s fixes worked or not. And if you were, you would have saved confusion by saying an actual version number rather than “7+” – that would have eliminated the need for me to ask what you really meant.
In the end, my advice to you is:
- Take responsibility for backing up your own data, or it’s going to bite you again – whether Notepad++ or some other text editor or any other application that creates files with data that you care about
- When reporting problems, here or anywhere, give details rather than approximations or vague memories
- In the end, it is up to you to decide whether an application meets your needs. If Notepad++ is not sufficient for your needs, then feel free to switch to an application that does meet your needs. However, understand that no matter how many development dollars have been spent, or not, on a certain application, unexpected things can happen to your data.
-
@TrueNeutralEvGenius said in Fix corrupted txt file (NULL):
no, you were wrong. It has nothing to do with backup option
Was “Enable session snapshot and periodic backup” on or off?
-
@peterjones In the end you are just a graphoman. My recommendation to you is to never give advices to people who never asked for them. It can end up very bad for you in non trivial way. And do not project your complexes and personal problems by trying to take the stance of a superior, while you are inferior by nature, what your writing and Dunning-Kruger and inferior complex show. Take care and good luck with your struggles.
-
@trueneutralevgenius ,
Talk about inferiority complex (get the spelling right) with an additional diagnosis of narcissistic personality disorder, and there you have it. However, since neither of us is a celebrated doctor of psychology, whatever opinion we exude…is just that, an opinion. On the other hand, your stupidity in not having important work backed up independent of Notepad++, belies the actual villain in this incidence. You. Don’t take your own incompetence out on volunteer users. Your opinion is about as relevant as the 13 month delay it took for you to get your sorry butt back here to read his missive of your incompetence.Have a nice day.
-
This post is deleted! -
Hello, @TrueNeutralEvGenius,
In your post to @lycan-thrope, you said, near the end :
Don’t waste time. …
But, it’s YOU who wastes all your time with your huge answer !!
So, please, as previously stated, just back up your work very regularly and all problems will disappear ;-))
Best Regards,
guy038
-
@guy038
Hello. Don’t worry, everything is backed up. I fixed the problem with notepad++ and solved that mystery too, after that problem happened. I thought of sharing the explanation and some C++ code, but since there are people like some of you who are presumptious, arrogant and toxic “advicers-helpers”, I don’t even want to share the solution, to be cynical-honest. And it was backed up with an exception of those 8 monthes I wrote earlier (along with 2 servers with 16 TB each), because I lost my trust (and never had, to be honest) to syncing to cloud subsystems and raid massives long time ago. That work is finished. Yes, could manually back up most important files, but do not assume the state of someone when near death, for example, you don’t want and can’t to back up manually, you just want to finish your life work magnum opus before you die. Wish you could understand. If not, then ok, c’est la vie. Anyway… I don’t think I want to explain in details in some more pages. Pretend that you care anywhere and with someone else.
That answer was maybe ‘huge’ for you, but for someone who writes hundreds of pages a day, and writes something like that answer in 10-20 minutes it’s not “huge”. It was my free time and I can spare it as I want. Or maybe you have problems with that, are you a censor and fascist against freedom of speech? Man, what’s wrong with you too? Another one who enters in conversation of different people without any invitation or useful information to the table. There is no need for another unneeded silly opinion, which add nothing useful. Also you don’t need to use caps (“YOU”) and stylistics (“[b]”, etc. ) of type to make information exchange, that’s kind of strange, that’s not a programm code or something… Well, I guess, it’s your habit, and old habits die hard. So do as you wish. But again, just don’t go to people throwing your unndeeded advices, man. That’s plain foolish and nonconstructive.Also, unfortunately, backing up is not everything, and all existential problems in the world will not dissapear, if you will make back ups even every day or every minute. But in the context, true. Ok.
Quite everything is relative. Everything is ambivalent and I don’t see any need for a further discussion. I fixed all problems with notepad++ for myself, and I definately don’t need anymore advices I didn’t ask for from you or anyone else. Convince yourself more that your opinions and comments are needed and cope harder with that in your echo chamber and sweet dreamy illusions. Tragicomedic. Take care and good luck to you too with your struggles.
-
@TrueNeutralEvGenius ,
I had to stop reading after I realized I hit a nerve and you were having a temper tantrum; 9 months later.
Have a good day and a nice life. Bye. -
@TrueNeutralEvGenius
You did not only talk about graphomania – a deviation I did not know about earlier – but you also gave a few fine examples of the disease. Thank you for the lesson. -
Hi guys
Thanks to the investigation & implementation of @xomx , we have identified a plugin which could cause this issue eventually: “SaveAsAdmin”.
ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14990#issuecomment-2053828749While browsing this very long discussion of the issue, I found no Debug Info regarding files corrupted NUL characters issue.
So for people who have encountered NUL characters content problem, could you confirm (or deny) that you have had SaveAsAdmin plugin installed?