<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Notepad++ crashes and erases the file being worked on.]]></title><description><![CDATA[<p dir="auto">This is a recurring problem. It needs to be fixed so that IF NPP crashes does not erase what has been previously saved to disk.</p>
<p dir="auto">There is NO reason that NPP needs to erase the file. This bug needs to be fixed ASAP. It has been going on for too long. It is obviously a NPP problem as I have not seen this happen with any other program.</p>
<p dir="auto">Before, when this happened I was able to restore the file from the AppData backup directory but this time it could not be done. The file size was 0 bytes.</p>
<p dir="auto">My info CANNOT be restored as it is the result of many hours of research over an extended period of time, some from a very long time ago (I was adding to it).</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/13383/notepad-crashes-and-erases-the-file-being-worked-on</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 20:39:33 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/13383.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Mar 2017 18:31:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Thu, 19 Mar 2020 10:51:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3182">@gstavi</a> ,</p>
<p dir="auto">Good points.</p>
<blockquote>
<p dir="auto">I hope you indeed fixed ALL the races</p>
</blockquote>
<p dir="auto">I did. Those related to periodic backups.</p>
<blockquote>
<p dir="auto">I am not convinced about disk caching explanation because this should have made it a common problem for lots of application.</p>
</blockquote>
<p dir="auto">It is apparently a common problem for other applications too.<br />
Here is another debate on the topic:<br />
<a href="https://community.notepad-plus-plus.org/post/48725">https://community.notepad-plus-plus.org/post/48725</a></p>
<p dir="auto">Your patch looks good but to avoid the disk caching problems you need to use <code>FILE_FLAG_WRITE_THROUGH</code> (or in your used Win API it should be <code>_WRITE_THROUGH</code>, I’m not sure) when creating/opening the files.</p>
<p dir="auto">As I’ve written before in several places the problems are two:</p>
<ol>
<li><code>fopen</code> erases file contents on open with write permissions. This is causing the “no-space on disk” file contents loss problem and perhaps the problem you have encountered and are mentioning here.</li>
<li>File contents loss on reboot/power loss (even when files are edited and saved) are caused by disk write caching (defined by Microsoft as “lazy writer” in some of their documents).</li>
</ol>
<blockquote>
<p dir="auto">Perhaps a combination of reasons will convince <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3">@donho</a> at some point.</p>
</blockquote>
<p dir="auto">I doubt it. A lot of people (including me) had given him a lot of reasons already including the root cause of the problems and a possible fix.</p>
<blockquote>
<p dir="auto">Do remember it if you ever choose to fix the out-of-space bug by creating a new file</p>
</blockquote>
<p dir="auto">I though about it in the beginning when I was trying to figure out the cause of the write issues.</p>
<p dir="auto">In my PR I actually use native Win32 file handling API as you do in your patch to avoid the <code>fopen</code> file contents erasure. There is no need to create new file in that case - forget that I mentioned it (it was just a possible and sub-optimal workaround to the first problem I gave above).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/51512</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/51512</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Thu, 19 Mar 2020 10:51:07 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Wed, 18 Mar 2020 20:02:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/429">@pnedev</a><br />
Since I looked at the code much longer ago than 1 year then perhaps you fixed the things I saw back than.<br />
I hope you indeed fixed ALL the races because this is one of the more difficult challenges for SW developers.</p>
<p dir="auto">I am not convinced about disk caching explanation because this should have made it a common problem for lots of application.</p>
<p dir="auto">If it helps in any way I also made a <a href="https://github.com/gstavi/npp/blob/master/patch/0008-Use-file-descriptor-API-instead-FILE-api.patch" rel="nofollow ugc">patch</a> that changes Notepad++ file api. My reason was that fopen was resetting file permissions and ownership over SAMBA.  Specifically losing the ‘execution’ permission of script files. Perhaps a combination of reasons will convince <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3">@donho</a> at some point.<br />
Do remember it if you ever choose to fix the out-of-space bug by creating a new file since it will introduce the same problem. A new file will have default permissions rather then the possibly specific permissions of the original file.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/51502</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/51502</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Wed, 18 Mar 2020 20:02:42 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Wed, 18 Mar 2020 12:24:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3182">@gstavi</a> ,</p>
<p dir="auto">You are totally right about Notepad++ being mainly single-threaded and that the periodic backup uses multi-threading but that is not the problem.<br />
I made PR maybe a year ago that fixed possible race conditions between the threads and it was merged. I also tested it at the time, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@Claudia-Frank</a> tested it too and periodic backups proved to be working properly.</p>
<p dir="auto">The problem remains to be the disk write caching that delays the actual write to the disk which leads to loss of data on sudden power loss or reboot (due to update for example).<br />
I actually did this <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/pull/6164" rel="nofollow ugc"><strong>PR</strong></a> to fix the problem and in relation to these reported issues (<a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/6133" rel="nofollow ugc">https://github.com/notepad-plus-plus/notepad-plus-plus/issues/6133</a> and <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5664" rel="nofollow ugc">https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5664</a>) but it was rejected.</p>
<p dir="auto">Don has written in the release notes of the latest Notepad++ version this:</p>
<blockquote>
<p dir="auto">Fix Notepad++ doesn’t exit correctly while Windows 10 update restart.</p>
</blockquote>
<p dir="auto">I don’t know if that helps though and in what cases.<br />
Here is the link: <a href="https://notepad-plus-plus.org/downloads/v7.8.5/" rel="nofollow ugc">https://notepad-plus-plus.org/downloads/v7.8.5/</a></p>
<hr />
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/17441">@Shrikant-Shrinivas</a> ,</p>
<p dir="auto">I’m sorry for your data loss, Notepad++ can really do better in that situation but I would advise you to always save your work and close Notepad++ when leaving the computer for longer periods (especially don’t leave it open overnight) to minimize the chances of this happening.<br />
You could try using Recuva to try recovering your lost files.</p>
<p dir="auto">BR</p>
]]></description><link>https://community.notepad-plus-plus.org/post/51486</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/51486</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Wed, 18 Mar 2020 12:24:57 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Tue, 17 Mar 2020 23:43:32 GMT]]></title><description><![CDATA[<p dir="auto">Don’t know for sure but I recommend for you to disable “Session Snapshot and Periodic Backup”.<br />
I believe it is part of the problem rather than the solution.</p>
<p dir="auto">Notepad++ like other legacy GUI applications is almost entirely single threaded running the Windows message loop.<br />
Last time I looked (admittedly long ago) it seemed that the snapshot feature adds multithreading into Notepad++ which is not properly synchronized/locked with the rest of the single threaded code. I believe that if “shit happens” when this backup thread is active, either files may be wiped or empty files are written into the backup and these empty files are restored on the next restart overwriting the OK files. I never enabled this feature and never lost a file.</p>
<p dir="auto">Feel free to use “Remember Current Session” since this feature just tell the main thread to save file locations before Notepad++ exits.</p>
<p dir="auto">Some people are so lazy/unresponsible that they never save files and expect the snapshot to remember their modified files. But they really deserve to lose a few hours (or days) of work from time to time.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/51478</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/51478</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Tue, 17 Mar 2020 23:43:32 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Fri, 13 Mar 2020 12:07:04 GMT]]></title><description><![CDATA[<p dir="auto">I am amazed that so many people are having this problem, for so many years, and still there is no solution to it.<br />
What’s the use of coding in so many features and functionality when basic stability is not looked at.<br />
Today is 12-Mar-2020 and Win10 I believe updated overnight, and when I relaunch Notepad++ the whole session (a mix of saved and unsaved files) has disappeared, and I stare at a Blank file.<br />
Obviously, no error messages, and hence no dump files, etc.</p>
<p dir="auto">I have ticked “Remember Current Session for next Launch”<br />
And also “Enable Session Snapshot and Periodic Backup”. with a Backup every 7 seconds.</p>
<p dir="auto">But what is the Use of having a Session Backup System which will ditch you when you need it the most.</p>
<p dir="auto">If there is a Periodic Session Backup system, then where are the Previous Backups. Can Notepad++ not recognize when it is over-writing a File with Data, with a Blank file.</p>
<p dir="auto">We of course appreciate the Functionality of Notepad++ and fall heavily on it. We build our castles on it, and then type out data trusting it to keep it intact. And just when we least expect it, it pulls the rug from under the feet, and presents us a Neat Blank Page…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/51362</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/51362</guid><dc:creator><![CDATA[Shrikant Shrinivas]]></dc:creator><pubDate>Fri, 13 Mar 2020 12:07:04 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Thu, 13 Dec 2018 09:08:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/13922">@logic-error</a> ,</p>
<p dir="auto">I’m sorry, I couldn’t understand well your last post.<br />
You know, every program has it’s flaws (some might be really critical), they stay dormant and unnoticed but when they appear and are known they get fixed and the cycle repeats.</p>
<p dir="auto">If you decide to continue using Notepad++ get version 7.6 or bigger and you shouldn’t have problems like the one you described.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37464</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37464</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Thu, 13 Dec 2018 09:08:05 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Wed, 12 Dec 2018 17:39:51 GMT]]></title><description><![CDATA[<p dir="auto">I’m sorry again for slow responses, I get site error ‘HERE’<br />
if I do anything other than enter a preprepared response.<br />
This site won’t let me edit or immediate reply. prefer not to get wrapped up in all that as I already<br />
have a nice little problem to work on.</p>
<p dir="auto">If not the v7.2 is there a version attainable you might recommend?</p>
<p dir="auto">Thank you, So if I have this correct, I will go to my version 7.2 under:<br />
Settings &gt; Preferences &gt; Backup<br />
and uncheck the ‘Remember current session for next launch’? and<br />
uncheck the 'Enable session snapshot and periodic backup,<br />
remove the timer variables if they need removed after these are unchecked (I’m assuming they wont)<br />
remove path, and leave None as None.</p>
<p dir="auto">Erasing ones programs is beyond MESSED UP, I would expect that kind of thing as a ploy for an<br />
application to get one to turn pro/ proprietary ware, or a competitors taking advantage<br />
of a weakness or vulnerability. thank you all again for your time. I see no real<br />
altermative but to try to find another useable code editor, preferably one<br />
that doesn’t just up and erase my stuff.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37423</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37423</guid><dc:creator><![CDATA[logic error]]></dc:creator><pubDate>Wed, 12 Dec 2018 17:39:51 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Wed, 12 Dec 2018 14:38:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/13922">@logic-error</a></p>
<p dir="auto">If you are going to stick with your version 7.2, I would suggest you turn all “backup” options off…and see what happens going forward…good luck.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37420</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37420</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 12 Dec 2018 14:38:59 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Wed, 12 Dec 2018 14:23:04 GMT]]></title><description><![CDATA[<p dir="auto">Three times, or three deletions of my file being edited.<br />
Under Settings &gt; Preferences &gt; Backup, I have:<br />
Backup every 7 seconds, then it’s path does correspond with my current path.<br />
Then under ‘Backup on save’ , NONE is selected with no custom backup directory added</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37417</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37417</guid><dc:creator><![CDATA[logic error]]></dc:creator><pubDate>Wed, 12 Dec 2018 14:23:04 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Wed, 12 Dec 2018 13:41:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/13917">@Mike-Depping</a> , <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/13922">@logic-error</a> ,</p>
<p dir="auto">Does the problem occur often?<br />
Is your Notepad++ periodic backup feature turned ON?</p>
<p dir="auto">Notepad++ version 7.6 has fix for this issue (or similar) so I’m trying to figure out if the fix covers your case as well.<br />
Please update Notepad++ if you can and try with it.<br />
I have to warn you though that the plugins installation and location paths have changed in 7.6 and that may lead to problems finding your plugins. You might need to manually fix that but there is nothing to worry about. You can find info about the new 7.6 plugin handling and paths in the community posts or here as well: <a href="https://notepad-plus-plus.org/news/notepad-7.6-released.html" rel="nofollow ugc">https://notepad-plus-plus.org/news/notepad-7.6-released.html</a> .</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37413</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37413</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Wed, 12 Dec 2018 13:41:52 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Wed, 12 Dec 2018 12:55:25 GMT]]></title><description><![CDATA[<p dir="auto">Sorry for delayed response. This site would not let me edit or<br />
repost. I also appologize for not more thouroughly reading entire post before posting.</p>
<p dir="auto">current version: Notepad++v7.2 (64-bit)<br />
listed under plugins: Converter, MIME Tools<br />
Path 1st and 2nd instance of: C:\Program Files (x86)\Notepad++\notepad++.exe<br />
Path 3rd instance of: somewhere else, on hard drive.<br />
Admin mode : not sure and I can’t find where that would be listed<br />
Local Conf mode : not sure and I can’t find where that would be listed<br />
OS : Windows 10 (64-bit)</p>
<p dir="auto">No changes, no reicently installed programs, Notepad++'s machine never goes online.</p>
<p dir="auto">saves were ‘Save’ not ‘Save as’</p>
<p dir="auto">No use of online cloud anything ever.<br />
First 2 deletions large file 3821 lines (145 KB)<br />
Third deletion was small file.<br />
The spellcorrect/suggestions thing was acting oddly between 2nd and third deletion incidents,<br />
changing things on occasion.</p>
<p dir="auto">wifi was active in vacinity during all deletion incidents but not connected on machine. ( I’m Mike above)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37410</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37410</guid><dc:creator><![CDATA[logic error]]></dc:creator><pubDate>Wed, 12 Dec 2018 12:55:25 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Wed, 12 Dec 2018 08:56:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/13917">@Mike-Depping</a> ,</p>
<p dir="auto">What is your Notepad++ version and could you briefly describe what exactly happened?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37407</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37407</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Wed, 12 Dec 2018 08:56:56 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Tue, 11 Dec 2018 20:53:51 GMT]]></title><description><![CDATA[<p dir="auto">MINE AS WELL. I too have had the problem of notepad++ crashing and erasing my programs. I back my stuff up very regularly, but not always daily. At one point I know I had entirely too many open programs which did understandably crash it a couple times with no loss of data ( programs erased). I since refrained from excessive open programs. but after that, and with reinstalled newest version it started eating my programs. Html &amp; javascript  webGL locally ran applications I was developing. Twice it occurred while attempting to make 3D iframe alpha-transparent. First time I was able to save the open firefox instance of it and straighten out the DOM rearranged stuff. Second time it occurred I lost a weeks worth of work and was unable to save in that manner. Third time  I wasn’t working on the 3D html, but a newest Three.js library test scene. I have started creating a little stack of three exact same versions of anything important I put in there now. It has been (notepad++) deleted and reinstalled ea time except this last time. The Toshiba windows 10 does not go online for any reason ever. I also would like this matter considered seriously. I LIKE my notepad++, I LIKE  the dark background and light code script, styles. Why would I want to use windows notepad. I don’t have a clue what to use for alternative code editor, any proprietary-ware is out of the question. I wouldn’t even know where to start at troubleshooting why this would occur, I have looked for months for a post of this nature to begin addressing this very serious problem and only now just found it ( this post). I hope my reporting it here is in some way helpful, any additional information someone might need I have overlooked I will be happy to add. Thanks, freemnemoryerror (mike)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37400</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37400</guid><dc:creator><![CDATA[Mike Depping]]></dc:creator><pubDate>Tue, 11 Dec 2018 20:53:51 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Mon, 03 Sep 2018 15:51:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12947">@Dimitris-Stefanakis</a><br />
Thanks man, this helped me a lot!<br />
Just pressed ctrl+s and boom! Crash and file is empty</p>
<p dir="auto">Notepad++ v7.5.8   (32-bit)<br />
Build time : Jul 23 2018 - 02:03:53<br />
Path : C:\Program Files (x86)\Notepad++\notepad++.exe<br />
Admin mode : OFF<br />
Local Conf mode : OFF<br />
OS : Windows 8.1 (64-bit)<br />
Plugins : ComparePlugin.dll DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll</p>
]]></description><link>https://community.notepad-plus-plus.org/post/34563</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/34563</guid><dc:creator><![CDATA[Ведьма Абсолюта]]></dc:creator><pubDate>Mon, 03 Sep 2018 15:51:30 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Sun, 02 Sep 2018 10:30:12 GMT]]></title><description><![CDATA[<p dir="auto">sorry for reposting after searching in google i find a solution, my missing data from the file was there %AppData%\Roaming\Notepad++\backup. solution link <a href="https://stackoverflow.com/questions/21712139/notepad-how-to-recover-a-deleted-file" rel="nofollow ugc">https://stackoverflow.com/questions/21712139/notepad-how-to-recover-a-deleted-file</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/34550</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/34550</guid><dc:creator><![CDATA[Dimitris Stefanakis]]></dc:creator><pubDate>Sun, 02 Sep 2018 10:30:12 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Sun, 02 Sep 2018 07:34:43 GMT]]></title><description><![CDATA[<p dir="auto">I just encounter the exact same problem today, notepad++ crashes and erases my file. As a general notice i have to say that notepad++ from a stable must use tool for the last 1-2 year it’s an unstable tool that crashes quite often, but so far i didn’t loose any work until today.<br />
I’m using notepad++ in 3 different machines one with windows 10, one windows 7 and one which is an iMac with windows 7).<br />
The problem today appeared on my imac windows 7 installation (works perfectly for 3 years), anyway here is my debug info from notepad++<br />
Notepad++ v7.5.7   (32-bit)<br />
Build time : Jun 29 2018 - 00:46:55<br />
Path : C:\Program Files (x86)\Notepad++\notepad++.exe<br />
Admin mode : OFF<br />
Local Conf mode : OFF<br />
OS : Windows 7 (64-bit)<br />
Plugins : AutoSave.dll ComparePlugin.dll CSSExplorerAdapter.UNICODE.dll HTMLTag_unicode.dll JSMinNPP.dll NPPJSONViewer.dll NppSaveAsAdmin.dll PluginManager.dll XMLTools.dll DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll</p>
]]></description><link>https://community.notepad-plus-plus.org/post/34548</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/34548</guid><dc:creator><![CDATA[Dimitris Stefanakis]]></dc:creator><pubDate>Sun, 02 Sep 2018 07:34:43 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Tue, 07 Mar 2017 07:39:15 GMT]]></title><description><![CDATA[<p dir="auto">Which Notepad++ version are you using. The phrase “I am using the very last version provided” is not precise.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/22352</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22352</guid><dc:creator><![CDATA[AdrianHHH]]></dc:creator><pubDate>Tue, 07 Mar 2017 07:39:15 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Mon, 06 Mar 2017 16:57:48 GMT]]></title><description><![CDATA[<p dir="auto">I was using the last file that was created and using “save as” to a new file name. Then erasing the old data and entering the new data in the new file.</p>
<p dir="auto">As I said previously, I am wondering if the “underlying” formatting for the original file (what we don’t see but is necessary to create a file behind the scenes) was corrupted.</p>
<p dir="auto">Time will tell since I recently copy-pasted the data in the original file to a “new” file, thus getting rid of the old one completely. There is no connection between the two. This “may” resolve the issue.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/22334</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22334</guid><dc:creator><![CDATA[W C]]></dc:creator><pubDate>Mon, 06 Mar 2017 16:57:48 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Mon, 06 Mar 2017 15:59:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/623">@W-C</a><br />
if you want to go the python script way,<br />
<a href="https://notepad-plus-plus.org/community/topic/11414/backup" rel="nofollow ugc">here</a> is described how it could look like. If you want modification, checks etc… let us know.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/22333</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22333</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 06 Mar 2017 15:59:29 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Mon, 06 Mar 2017 15:43:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/623">@W-C</a></p>
<p dir="auto">Yes, please let us know whether the content-copied version of the file has the same problems as the original.</p>
<p dir="auto">The file sizes you mention are <em>not</em> large files, so it’s probably not an issue with large files.  The session backup with huge files (roughly &gt;100MB, IIRC) has had reported issues of zeroing out files before, but I’ve never heard of it doing that for such small files.</p>
<p dir="auto">If it doesn’t solve it for you, the <code>Notepad++ &gt; ? menu</code> is found on the menu bar of the Notepad++ window, and <code>Debug Info</code> is in that menu.  See below image for reference.<br />
<img src="https://camo.nodebb.org/7a805843908e16c908e49bedcf4317a6c71a58bd?url=http%3A%2F%2Fi.imgur.com%2FsG8JkAb.png" alt="" class=" img-fluid img-markdown" /></p>
<p dir="auto">And answering <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/429">@pnedev</a>’s question for clarification on your template would help us help you, too.</p>
<p dir="auto">And, as regards making sure I didn’t lose any more data: If I were in your situation, I would either automate version control software, as outlined below; or use cloud storage to your advantage, as descibed further below.</p>
<h2>Version Control Automation</h2>
<ol>
<li>Use my standard version control software (TortoiseSVN, Git, etc) to make sure that I would never loose <em>too much</em> data.</li>
<li>Use a plugin such as NppExec, <a href="http://sourceforge.net/projects/npppythonscript/files/Python%20Script%201.0.8.0/PythonScript_1.0.8.0.msi/download" rel="nofollow ugc">PythonScript</a>, or <a href="https://github.com/dail8859/LuaScript" rel="nofollow ugc">LuaScript</a> to automatically run an <code>svn commit</code> or equivalent.  For example, in NppExec:
<ul>
<li>
<p dir="auto">I save the following script as “SvnCommit”</p>
<pre><code>NPP_SAVE
cd "$(CURRENT_DIRECTORY)"
INPUTBOX "SVN commit $(FILE_NAME)" : "Message: " :
cmd /c svn commit $(FILE_NAME) -m "$(INPUT)"
cmd /c svn update $(FILE_NAME)
</code></pre>
</li>
<li>
<p dir="auto">and then I use <code>Plugins &gt; NppExec &gt; Advanced Options</code> to place the SvnCommit script in the Macros menu</p>
</li>
</ul>
</li>
<li>Use <code>Settings &gt; Shortcut Mapper</code> to assign a keyboard shortcut to the SvnCommit script.</li>
<li>Use that new keyboard shortcut every time you save this file</li>
</ol>
<h2>Cloud Automation</h2>
<p dir="auto">Alternatively, if you have a OneDrive, DropBox, or similar cloud-storage account, you could automate backing up your critical file into your cloud-storage folder:</p>
<ol>
<li>
<p dir="auto">edit your file in its normal location</p>
</li>
<li>
<p dir="auto">save an NppExec script similar to the following as “SaveAndCopyToCloud”</p>
<pre><code>NPP_SAVE
NPP_SENDMSG NPPM_SAVECURRENTFILEAS 1 "C:\Temp\$(FILE_NAME)"
</code></pre>
</li>
<li>
<p dir="auto">place “SaveAndCopyToCloud” in the Macros menu as described above, assign shortcut, and use that shortcut to save the file and copy it to the cloud</p>
</li>
</ol>
<p dir="auto">But since not all cloud-storages keep backups, and it might write the 0byte version to the cloud, you might want to put some additional scripting between to only copy it to the cloud folder <em>if the filesize is bigger than 0</em> (or some other threshold).  I couldn’t immediately figure out how to grab the filesize with NppExec: I could probably do it by grabbing the output from the windows <code>dir</code> command into NppExec, and somehow parsing it… but at that point, I’d probably switch to a different scripting language – I would do it in perl for myself, since I’m more comfortable in perl… but given that the random NPP user probably doesn’t have perl isntalled, I would probably suggest Python, because you could easily get an installation of Python integrated with NPP using the above link to the PythonScript download.</p>
<p dir="auto">If you would like a PythonScript solution to save the current file, then save a copy to a specified directory only if file-size is bigger than 0bytes (or some larger threshold), someone here could probably code it up pretty quick.  <em>I</em> would need your patience and a day or two, because I’m not a Python coder, and have spent my distraction time for this morning on this reply, especially looking into the NppExec particulars for “save current file as”, but could probably figure it out eventually.  However, there are plenty of people here with more Python/PythonScript experience than I have that could probably cobble together the save/filesize-check/copy-to-another-folder in a few minutes, if they want to take that challenge.</p>
<p dir="auto">Anyway, good luck</p>
]]></description><link>https://community.notepad-plus-plus.org/post/22331</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22331</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 06 Mar 2017 15:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Mon, 06 Mar 2017 08:50:02 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/623">@W-C</a> ,</p>
<p dir="auto">Could you please also clarify the following:</p>
<blockquote>
<p dir="auto">It seems to happen on one particular file (or files derived from one particular file. I use what I call a “template” when starting a new file, using the “layout” from one file and “saving as” another file (deleting the parts not needed in the new file and adding new data that applies to the new file. I hope this is clear.</p>
</blockquote>
<p dir="auto">When you say you are using one particular file as template how are you doing that? You open the template file and use “Save As” command? Or you are using the “Save a Copy As” command?<br />
That is important, thank you for providing that info.</p>
<p dir="auto">FYI: The “-noPlugin” option is provided on the command line if you are starting Notepad++ from the Windows <em>cmd</em>. You can also disable the plugins if you go to your N++ install folder, <em>plugins</em> subfolder and move all DLL files to the <em>disabled</em> subfolder there. To enable them again move them back as they where. However, I don’t think they are related to the issue you are seeing.</p>
<p dir="auto">BR</p>
]]></description><link>https://community.notepad-plus-plus.org/post/22323</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22323</guid><dc:creator><![CDATA[pnedev]]></dc:creator><pubDate>Mon, 06 Mar 2017 08:50:02 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Sat, 04 Mar 2017 17:13:59 GMT]]></title><description><![CDATA[<p dir="auto">Thank you very much for trying to help and being very constructive.</p>
<ul>
<li>
<p dir="auto">I am using the very last version provided.</p>
</li>
<li>
<p dir="auto">I don’t seem to find where the debug info is located.</p>
</li>
<li>
<p dir="auto">The plugin manager says the following plugins are installed. I have not installed any plugins except as provided automatically when upgrading.<br />
Converter<br />
MIME Tools<br />
others shown outside the PM that are: not listed in plugin manager)<br />
Npp Export<br />
NppFTP</p>
</li>
</ul>
<p dir="auto">*-noPlugin command-line argument: where does this go? I don’t know IF I should add this. I also don’t think I use any of the default plugins installed.</p>
<ul>
<li>
<p dir="auto">Files are in the range of 4kb to 120 kb.</p>
</li>
<li>
<p dir="auto">Saved on a laptop hard disk.</p>
</li>
<li>
<p dir="auto">It seems to happen on one particular file (or files derived from one particular file. I use what I call a “template” when starting a new file, using the “layout” from one file and “saving as” another file (deleting the parts not needed in the new file and adding new data that applies to the new file. I hope this is clear.</p>
</li>
<li>
<p dir="auto">I have just tried to resolve this problem by copying the data from the problem file, deleting the problem file,  then creating a “new” file by pasting in the data and saving it as a new file. If it had anything to do with the underlying “formatting” of the old file I hope this might solve the problem. Only time will tell.</p>
</li>
<li>
<p dir="auto">I was not aware of the backup settings. The first two boxes were checked and backup every 7 seconds, I assume the default setting. Changed it to 60 seconds. Backup on Save was none, changed it to “simple.” The problem is that it only saves one backup and erases previous backups by overwriting the previous one, sometimes leaving a backup with 0 bytes. It should save at least the last 3 backups to be fully effective. Maybe this can be an upgrade for a future release.</p>
</li>
<li>
<p dir="auto">The crash occurs when I “attempt” to “save” a file (which I do every time I add a little bit of new data). Thus, backup may not be effective at times as it erases the previous one.</p>
</li>
<li>
<p dir="auto">I use NPP primarily to construct and modify web pages. It is very good for that. Do NOT want to use Windows Notepad.</p>
</li>
<li>
<p dir="auto">I have not recently installed another application.</p>
</li>
</ul>
<p dir="auto">I hope that this will help give you a better idea of the issue.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/22302</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22302</guid><dc:creator><![CDATA[W C]]></dc:creator><pubDate>Sat, 04 Mar 2017 17:13:59 GMT</pubDate></item><item><title><![CDATA[Reply to Notepad++ crashes and erases the file being worked on. on Fri, 03 Mar 2017 22:36:39 GMT]]></title><description><![CDATA[<p dir="auto">Yes, crashes are annoying (or worse), and loss of data even more so.  If NPP is causing this loss of data, then it should definitely be fixed.</p>
<p dir="auto">It sounds vaguely like other issues I’ve seen on the forums – and it often has to do with very large files, or saving to network locations.</p>
<p dir="auto">You’ve given no details, which means anyone who tries to help you is just guessing.  Please help us help you:</p>
<ul>
<li>What version of Notepad++ are you using, and what plugins are installed ( <code>Notepad++ &gt; ? menu &gt; Debug Info &gt; Copy debug info into clipboard</code> )?</li>
<li>if you run notepad++ with the <code>-noPlugin</code> command-line argument, does the problem persist?</li>
<li>How big is your file (kB, MB, GB)?</li>
<li>Where are they saved (harddrive, USB stick, network location, cloud folder)?</li>
<li>Does it happen for every file you edit, or just this one (or just a few)?  If not every file, what’s the difference between this file (these files) and the ones that don’t crash.</li>
<li>Did you recently change something (especially in <code>Settings &gt; Preferences &gt; Backup</code> or <code>&gt; Cloud</code>)?
<ul>
<li>what are your backup settings?</li>
</ul>
</li>
<li>Did you recently install some other new unrelated application?</li>
</ul>
<p dir="auto">Also, please remember that, while sometimes some of the developers visit, these forums are primarily populated by <strong>fellow users</strong> of NPP – and those who regularly read here generally <em>want</em> to help others.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/22292</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/22292</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 03 Mar 2017 22:36:39 GMT</pubDate></item></channel></rss>