Notepad++ just deleted all the text from my files
-
@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?
-
@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.
-
@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. :(
-
@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. -
@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 -
@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 -
@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 intomspaint.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. -
@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.dllOkay, 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
-
@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.
-
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. -
@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 thatall
files opened got corrupted.The weird thing here, beside the loss of the theme and the files opened in the past is
the corruption ofall
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.
-
@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.
-
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. -
-
@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? :)
-
I’m quite good in asking obvious questions :-D
-
@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.
-
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
-
Yes, this issue is really weird. @Alan-Kilborn said it right - only the modified files get corrupted. This is the notorious issue with file corruption on power loss.
The strange thing is the session file as well. But, again, it is also “modified”. @Maddock-Emerson might have modified it’s theme files as well.
The difficulty in reproducing this issue makes it very hard to debug so we can basically just guess what might be causing it.So here is one guess:
As far as I recall from the code, if you have edited a file and haven’t saved it and the backup is enabled, and there is power loss for example, after Notepad++ restarts, it detects that the file has backup and restores it from there. I can’t remember if Notepad++ asks the user for confirmation, perhaps it does. But if during the power loss the backup was taking place, the backup might be corrupted BUT the original file might be OK and just AFTER Notepad++ restarts, the corrupted backup overwrites the “unsaved” original file.I need to check that scenario.
-
Do you by any chance still keep the files that are all NUL?
Can you send some of them to me? You can simply share them here in the community or send them via e-mail (pg.nedev@gmail.com).
Thank you. -
@pnedev said:
Yes, this issue is really weird. @Alan-Kilborn said it right - only the modified files get corrupted.
Well, thanks! Sometimes I get it right (still striving for 100%). :)
I should have mentioned that (and again going from memory) that at least one user complained that not only are the modified-during-current-run files trashed, but any backups (either of the .bak variety, or the verbose type) made of these files made during the current run are also NULlified. Since these backup files were “modified” (by N++) during the current run, they suffer the same fate as files in tabs (that have been “modified”).
So this is a doubly dangerous bug as the normal backup mechanism is providing absolutely zero protection. One could work for hours (or days) on a file, feeling their data is very protected…when in reality nothing could be further from truth.
Aside: The word modified has an association when talking about file-tabs in N++ that changes have been made and not saved (i.e., tab floppy disk icon is red). This may be confusing for the current discussion because the corruption very likely affects both types of files (modified-but-unsaved and normal saved files). Maybe for purpose of discussion of this, it is better to talk of files touched by N++ during current N++. (Yes, I know “touch” has another meaning – altering the timestamp of a file without changing its contents – which shouldn’t be confused here).