Automatic Reset
-
Recently I have got this bug in notepad++, when ever i shutdown and start my computer and open notepad++ my unsaved files go vanishing and the whole notepad ++ resets to default. can any one help me with this bug ?
-
It shouldn’t do that but I recommend saving all creations then keep notepad++ open it should when closing your PC still be open then go back to the saved project and right click on the saved file and it should say edit with Notepad++ :) I hope this helped some how!
-
There are terrible problems with the automatic saving feature, if you rely on it I strongly advise you to make a copy of your “backup” folder and session.xml in %APPPATH%\Notepad++ before every closing of either Notepad++ individually or the entire computer, and keep several copies of them.
It’s better to copy also the N++RECOV folder if you have one, although I’m not seeing problems with that lately.For me it’s not an unbearable problem because I always use the Windows’s hibernation, so I restart Notepad++ only once every couple weeks.
Recently I haven’t experienced problems when closing explicitly Notepad++, but every time that I let it be closed by the Windows’s shutdown procedure I lose all the contents of the backup folder, and thus all the so-to-say unsaved files if I’m not careful.
What usually (maybe always) happens is that the “backup” folder gets nuked, and after that at the first next start of Notepad++ the session.xml gets cleaned of all the now unreachable unsaved files, without any warning.
At that point you’ll better have a backup of session.xml besides the backup folder, because although all the files’ contents are in the folder there are easily old leftover files in there too and it will be hard to find out what you were working with if you don’t have the session.xml references.As I’m at it, beware that there are frequently problems after a system crash or especially a Notepad++ one: it has a feature that supposedly attempts to save your work, but it actually often (every time in the last couple years, to me) does the exact opposite by zapping the entire backup folder!!!
So as soon as you see a message from Notepad++ that it is about to crash before clicking the message go to %APPPATH%\Notepad++ and copy your backup folder and session.xml, preferably once after every Notepad++ message (I don’t recall well but there are two or three, and I seem to recall that the latest state gets attempted to be saved only after the first).And beware that you get the same problem if you open another instance of notepad++, only the state of one of the instances will get saved and there’s a very high chance that it will be the wrong one!!!
BTW yes, it is an horrific problem, it even got me to learn vim in search of a more reliable alternative, but it turned out that even vim is not really as great as they say so I’m still using NPP.
After the next loss I’ll spend some months learning emacs, then probably something else and in a couple years maybe I’ll have freed myself from this editor. -
Wow, interesting story. After myself having used N++ since version 6.7.5 and having never lost one file during that time (~2 years), I have to wonder, is this (your discussion) all related to letting N++ manage “unsaved” files (which I don’t ever do)? If so, isn’t the simple answer to just not do that?
-
@Bob_with_Pix You don’t get a message of unsaved files on shutdown if you enabled the session snapshot feature. Even if instead of saving them it irremediably deleted them, of course.
-
@Gabr-F What are the paths to your backup folder and the folder containing session.xml ? I believe that some computers can be configured to delete all, or most, of the users profile data areas on logout or login. Also, there are many web pages discussing problems where “Windows temporary profiles” are always being used rather than a users correct profile. Neither is the fault of Notepad++.
-
@AdrianHHH They are both in %APPDATA%\Notepad++ . It’s a local profile and nothing gets deleted automatically by Windows, in fact I still have in that same directory files that I put there manually dating back to 2013.
The only things that get deleted are the backup folder contents (actually only the files referenced in sesson.xml, maybe), their references in session.xml and possibly sometimes the contents of N++RECOV and the entire session.xml. I’m not sure about the latter two, I seem to recall that it happened but I’m not sure.
I’m pretty sure it is the fault of Notepad++.
Although I’m not really a C++ developer I had a look a the source code and I did saw something that might be the cause of some of this:
In NppCommands.cpp thefileCloseAll
call undercase IDM_FILE_CLOSEALL
sets thedoDeleteBackup
parameter to true ifisSnapshotMode
is true. This sounds really wrong, especially sincefileCloseAll
has aisSnapshotMode
as its second parameter and in the otherfileCloseAll
call, in NppBigSwitch.cpp, the parameters are indeed reversed.
However I tried to trace back the origin of the thing and it seems intentional, in 331898 where the doDeleteBackup parameter was introduced and it was the only parameter the call under IDM_FILE_CLOSEALL was already setting it always to true. So maybe it is something that doesn’t do what at first it seems, I leave it to DonHo to look into it, with my cursory C++ knowledge I can only go so far. -
@Scott-Sumner Yes, of course this is only relevant to the unsaved files feature (session snapshot).
As to “isn’t the simple answer to just not do that”, for one, there’s no indication in the software that this is such an unreliable feature, it will easily work for you so well that you’ll have come to rely on it and have many unsaved files by the time when you first lose them all. I’m sure it already happened to a lot of people.
As for me, I’m currently still using it because:
- Making the afore-mentioned frequent backups I learned to take hold of the problems
- I accumulated a pile of “New #” documents the sorting out of which I keep postponing
- It is very convenient, to keep quick notes or work on things that you ultimately don’t intend to save locally, such as mails or forum posts; they usually start with the expectation of not needing them for more than a couple days, but as other work comes they can easily be postponed and survive as “unsaved” files for a rather long time.
It is a very dangerous habit, but you may not realise it until you’re burned by it.
It led to me to realise that you should never trust any software more than the necessary.
So the habit itself should probably be discouraged by appropriate messages in the software, irrespective of the bugs, but if the features are kept they should still be fixed of course.
I think though that most off all what would be needed is a change in mindset on the part of the developers, you should be extremely careful before you add or touch any code that could delete stuff, however unimportant you believe that stuff ought to be.
If there isn’t this you can fix all the bugs you want, but you’re doomed to have new similar ones periodically. -
About my previous comment 7: I’m sorry, I realized that all that fileCloseAll stuff is bullshit, of course if you say “Close all” all the backups of the files you don’t want to save ought to be deleted.
So there’s nothing wrong there, I’d better leave the root cause analysis to the real developers.
It seems that I can’t edit that comment anymore, unfortunately.
-
So I’ve been a long time lurker here, but lately have done a few posts…what I’ve noticed in my time lurking here, and these are very broad generalizations, not meant to offend (why do people always say this right before sayng something offensive?):
-
the bigger bugs don’t tend to get fixed
-
feature suggestions are rarely implemented, even if they are simple and good
-
there really isn’t any concern about staying even relatively current with Scintilla releases, even though that is the heart of N++
-
even non-feature requests that are trivial from a coding standpoint that make a great deal of sense are ignored (e.g., how many times does the guy doing the Hungarian translation have to request that it be integrated?; e.g. how many times do others have to request that the correct plugin manager version be bundled in?)
-
developers may not have a great idea of what is important to users (e.g. when Notepad++ went from version 7.2.2 to 7.3 the change was “add MD5 checksum” (or whatever it was)…seriously, with other outstanding issues THAT was what was deemed important enough to roll a release? Okay, maybe some other stuff was in there, too, but it wasn’t important enough to mention in release notes?)
Don’t get me wrong, I’m not down on Notepad++. Live it, love it, use it constantly. I’ve just learned to profit from the good, and not get too worked up about the bad or what I consider “the bad”. It is free software, after all. Even with software that costs $$$, you are buying the warts too when you plunk down your cash.
What you @Gabr-F are talking about in this thread falls into the “the bigger bugs don’t tend to get fixed” category. Thus, I think that the answer is indeed NOT TO USE THE FEATURE THAT IS GIVING YOU TROUBLE (somebody else said this earlier). Sure, report it as a bug, even a huge bug, but don’t hold your breath that it will get any attention. In this particular case, you are lucky that there is a way to disable the feature that causes such devastating trouble for you.
Regarding leaving files unsaved for long periods of time, I may be old school, but I am on the Save hotkey after every few characters I type. I KNOW that software is unreliable, so I do all that I can to preserve my data. Sure, it’s all software, so N++ could handle leaving stuff “unsaved” (and save it behind the scenes just fine, and no guarantee that frequent Saving often really protects my data), but I’ve got to do all I can to feel good that my data is protected. The last time I lost data in a real sense was in the days of 5-1/4" floppy disks, so I guess I must be doing something right.
People these days trust the “Cloud” or “Time Machine” backups without a thought. What happens when you tune into the cloud and (gasp) it tells you what you think is there really isn’t? Give me my hand-made Winzip backups where I know stuff is where I put it, any day of the week! Okay, getting off track in a big way…
Okay, so I rambled on quite a bit, but my key point is above in BOLD, if anyone is still listening. :-D
-
-
Hello Alan, Here is my take on how things work with Notepad++.
Bugs do get fixed, provided they are described well enough to understand the problem and they can be reproduced. Take the issue with backups discussed in this thread. From the poor descriptions I cannot work out where the backup folder is located, is the whole backup folder being deleted? Is the folder being left but all the files in it are being deleted? Are just some of the files in the backup folder being deleted and if so, which files. The descriptions in the previous posts are vague and contradictory. Look also at the vague description of a problem in https://notepad-plus-plus.org/community/topic/13144/how-to-solve-notepad-stopped-working-issue and Claudia’s response asking whether the poster knows the steps to reproduce the problem. It this one of the “big bugs” you mention? Whilst this problem is acknowledged, no one knows how to reproduce it and so there is nothing to work on to create a fix.
New features are added, provided the description is clear, it appears to be needed by many people, and the developers can work out how to do it without a tremendous amount of work. But the developers have their own plans for enhancements and I, for one, have not seen anything about their long term goals for the program. The MD5 change might be a small step on the way to something wonderful that we will all appreciate down the line. Many suggestions for new features are better written as plugins so as to leave the core Notepad++ relatively small and avoid it being bloated with features that very few people want.
The rest of the complaints might be taken seriously if Notepad++ were a costly commercial product maintained by a dedicated team. But it isn’t. As I understand it, Notepad++ is maintained by a small group of altruistic people who do so because they love the software. But these people have to spend most of their time and effort doing other real work to earn their salaries.
People who find problems with Notepad++ (and other free software) should work really hard to clearly describe the problem and how to reproduce it. Without that the developers have to spend their precious time trying to understand the vague descriptions, or they put them aside until they get better evidence of the problem. Similarly with feature requests. Will they be useful to many people? How will they impact or change other aspects of the program? Would they be better implemented as plugins? Given the great Python support in Notepad++ is the feature achievable by a few line of Python?
-
I kinda worked out the source of the problem in the case of Notepad++'s crashes (only in that), I’ll post a bug report.
About the N++RECOV, you should largely disregard my comments about it, I had one in my profile directory (%APPDATA%\Notepad++) and so I was convinved it was created there, but I just found out that the code always put it either in %TEMP% or (up to 5.1.3) in C:\, so that one in my profile must have been have a copy made manually by me. This added significantly to the confusion in my investigations of these problems.
I previously mentioned a mystical “%APPPATH%” directory, I’m sorry, I meant %APPDATA%, I see from where came some of the confusion.
@AdrianHHH In the case of the problems after the application’s crashes only the files referenced in the session.xml file are deleted (and I found out why). I don’t remember in the other cases (which to me haven’t happened for quite a while).
By the way, I’m always quite vexed by those remarks about projects being voluntary etc. I understand the point of view and the feelings of the developers/contributors, but if we believe that the open source, free model should be preferred to the commercial one all critics should be accepted gladly as an opportunity for improvement and the end users should be allowed to express freely in the way they currently feel. There should be more structure and process to handle this well, but… ok I stop here, I think I’m off-topic enough already. -
First of all I don’t see how this is can be related to npp project
and all of the plugin developers.
If they ignore all wishes and issues how could it be that we do
get all those features and improvements.
For me, all of them doing a great job.I can’t understand why one thinks that only their concerns and/or whishes
are the important ones and if it isn’t solved within a certain
amount of time that nobody takes care.By the way, I’m always quite vexed by those remarks about projects being voluntary etc. I understand the point of view and the feelings of the developers/contributors, but if we believe that the open source, free model should be preferred to the commercial one all critics should be accepted gladly as an opportunity for improvement
Why do you think this is the case?
And how could you be vexed about those remarks?
Aren’t they valid?and the end users should be allowed to express freely in the way they currently feel.
I disagree.
If you get shout or insulted, are you in the mood to help - me not, for sure.There should be more structure and process to handle this well,
Again, why do you think this is the case?
Cheers
Claudia -
@Claudia-Frank I haven’t understood the first part of your post, was it actually directed to me?
About the rest, I was commenting on issues that I see to a lesser or greater extent in all the open source projects I know, so don’t take it too personally. From the little lurking I do I see that you’re very active in assisting the end users, and I have a good opinion of Don Ho as a person, if nothing else for the Charlie thing.
I wasn’t really interested in discussing this, I don’t think we’re going to work it out here and now; I just say that I believe that it would be beneficial for the whole project if you “sucked it up” if you get rude feedback, because:
- Feedback from the users is always useful for a project, if the project aims to benefit the other people. If you put too conditions or are unwelcoming you are very likely to smother it; many people will refrain to report their problems and opinions (or at least some of them).
With this I don’t mean that you should give the upmost attention to every report, there will for sure be mistaken bug reports, complaints of things that have nothing to do with the project, or even people who will make up things or be abusive just for the fun of it, but even from poor reports you can gain a lot once there are several of them: if youw kno that a problem is experienced and it matters to many of your users you should probably give it high priority and investigate it further (maybe by reaching back to some of the reporters to get more details). - If you give too importance to the manners you are very likely to miss the substance of the reports, which might be of high importance for the project.
There should be more structure and process to handle this well,
Again, why do you think this is the case?
Again I’m not criticizing Notepad++ in particular, even the commercial projects have a lot of trouble with this. There needs to be more structure especially to be able to deal with very large quantities of feedback. Look at the github Issues feature, they can work for a project with few users but they are wildly inadequate for popular ones, most have hundreds of unclosed issues all the time. You can make them work only by dealing with most reports haphazardily.
I know that most open source projects start as personal projects, and so their developers are very upset when people make demands or criticize them instead of thanking for what they have done and gave, but you should understand that many people (often the projects’ developers themeselves) claim that free open source is a superior model, so a lot of people choose to use open source software because they have high expectations for it, they easily believe that an open source software is bound to become among the best in its class, if not downright perfect. They rarely understand even that the various projects can have very different objectives; after all most projects look alike (github, discussion places…) and give the impression to be there for you.
Furthermore most users are not programmers and don’t understand the difficulties of software development.
Finally understand that on the internet there might be many reasons why someone behaves rudely at one point (e.g. fails to follow-up, etc.) so you should be very careful before taking things personally.
- Feedback from the users is always useful for a project, if the project aims to benefit the other people. If you put too conditions or are unwelcoming you are very likely to smother it; many people will refrain to report their problems and opinions (or at least some of them).
-
Maybe i should start with a disclaimer first.
Everything I write is my opinion, neither is it a fact,
if not stated otherwise, nor is it fiction. I do and
did not take it personally. I always try to answer as neutral
as possible but as a non-native English speaker it might
not always be that obvious.
Therefore, the rest of the comments are just my opinion - without any emotions.I haven’t understood the first part of your post, was it actually directed to me?
No, it was more of a general comment to all of us.About the rest
Obviously we (you and me) can’t solve the issues open source community(OSC) has in general.
OSC is far from being perfect and I believe they never can be, not only because there are
no strict rules but also because of the individuality of each.I agree, criticism CAN be helpful and in a perfect software development world. It would be
best to just take the part of the stuff which is related to the project and ignore the rest of it.
But we don’t live in that perfect world, thank god, and therefore I think we cannot expect that
critics will get take up neutral, because we are humans and humans, well most of it, do have feelings.Everything you wrote makes sense, in general, but because we are in a notepad++ forum and because
I got the impression that the complains were directed to npp I’ve asked my questions.
I don’t think that Don or any contributor to npp or plugin developer is ignoring issues airy.
But I wanted to understand why others (and I thought you too) think this is the case.
As already said, I don’t think just because an issue was reported some months ago and it
hasn’t been solved to the users satisfaction yet, it doesn’t mean no one takes care.I would really like to discuss this further but because you stated that you don’t,
I respect it and will end with the following.Nobody is perfect and nobody should try to be perfect,
because in a perfect world there is no space for joy.Cheers
Claudia -
@Alan-Kilborn Regarding the project, I don’t follow it so much so I can’t confirm or deny your assertions, although I did have some feeling of that.
As to “NOT TO USE THE FEATURE THAT IS GIVING YOU TROUBLE” , I agree, but in this case that feature is enabled by default, so it’s extremely easy to get burned unknowingly.
I agree with the data comments and I hope at some time I’ll be able to say that it’s what I do.
-
@Claudia-Frank Ok, I think we can agree that developers should strive to be tolerant and users should strive to be polite.
We can discuss this further (probably in another thread), just I can’t give it a high priority and will probably take my time from one reply to the other.
Nobody is perfect and nobody should try to be perfect,
because in a perfect world there is no space for joy.Meeeh probably, although a really perfect world ought to include the perfect amount of joy. Making the perfect world would probably be tantamount to solving the halting problem, though :) .
-
Ok, I think we can agree that developers should strive to be tolerant and users should strive to be polite.
100%
Making the perfect world would probably be tantamount to solving the halting problem, though :) .
:-D Yes, or how about finding a definition of a perfect world to which everyone agrees.
Cheers
Claudia