Notepad++ release 8.7.9
-
I think there is a regression. I suspect it is related to 8.7.8 #6, but I haven’t proven that yet. The bug is present in 8.7.8 and 8.7.9, but not in 8.7.7:
Open a new tab and type two lines:
abc def
Open the Find dialog; turn off wrap around, set regular expression, and enter:
.*
as the find expression. Place the caret at the beginning of the file, then click Find repeatedly. First it findsabc
; then a zero length match; thendef
; then a zero length match.In 8.7.7, clicking Find a fifth time produces the error message Can’t find the text “.*” from caret to end-of-file. In 8.7.8 and 8.7.9, Notepad++ becomes unresponsive.
Other tests suggest the problem occurs whenever there is a zero length match at the end of the file.
-
Indeed, it looks like Commit a52738c / PR 16208 is the cause.
Changing the line that changed:
return _document->NextPosition(position, 1);
to
return std::max(_document->NextPosition(position, 1), position + 1);
appears to fix it.
@donho, would you prefer that I prepare another pull request (after further testing)? Submit an issue and a pull request? Leave this to you?
-
@Coises ,
I can confirm the STR, and it does lock up my portable version of 8.7.9, just as described. There’s no reponse in the find dialog, and the button stays disabled and clicking anywhere else on the dialog crashes the app. -
@Coises said in Notepad++ release 8.7.9:
@donho, would you prefer that I prepare another pull request (after further testing)? Submit an issue and a pull request? Leave this to you?
Pull request #16371 submitted. Let me know if I should do anything else.
-
C Coises referenced this topic on
-
Even though 2 regressions (vertical tabbar & regexp hanging) have been identified and fixed for the upcoming release, auto-update will still be triggered for v8.7.9, for the following reasons:
- Both regressions will not impact most users:
- Few users utilize vertical tabbar.
- regexp hanging can only be reproduced under specific conditions. Notably, the issue has existed for a long time and it’s not truly a regression - it’s more accurately a shifted bug caused by a previous fix.
- Currently auto-update is triggered for v8.7.5, which contains a critical regression saving backup file without modifications. This issue has been resolved in v8.7.8.
- Triggering auto-update for v8.7.9 means a larger user base will adopt the version, allowing us to identify any critical issues more quickly and avoid chasing regressions in the next release.
So, if there is no objections, auto-update will be initiated for v8.7.9, in about 12 hours.
Please let me know your thought. -
D donho referenced this topic on
-
@donho said in Notepad++ release 8.7.9:
regexp hanging can only be reproduced under specific conditions. Notably, the issue has existed for a long time and it’s not truly a regression - it’s more accurately a shifted bug caused by a previous fix.
Not an objection, exactly, but a note, as the person who authored the flawed fix in 8.7.8 and the pending fix to the fix (that I didn’t discover in time to get it into 8.7.9):
The pre-8.7.8 failure case is indeed very specific; there has to be a null match in a UTF-8 file just before non-ASCII character, then the next attempt to match has to match one component of the expression and then attempt to backtrack to the starting position (which will be incorrectly determined, causing the bug).
The 8.7.8/8.7.9 failure case happens whenever there is a null match at the end of the file. Doesn’t have to be UTF-8, doesn’t have to involve a non-ASCII character. So, realistically, I think the new failure case will be more common than the original one. Maybe much more common.
Whether it will be common enough that promoting a release without the fix to the fix is a bad idea isn’t something I know how to judge… and it certainly isn’t my call.
It wouldn’t be so bad if it weren’t that it’s a hanging failure — one that requires force closing Notepad++ and hence losing all unsaved work. I made a bad error, and I didn’t discover it in time to fix it for two entire releases. I can only apologize for that, and leave it to others to decide how to minimize the damage.
-
@donho One concern I have is that a regexp search for something as simple as
^
or$
or.*
causes Notepad++ v8.7.8 and v8.7.9 to hang if it’s done at the end of a file (the last line does not need to be blank) or Mark-all if the last line of the file is blank.Fortunately, it does not hang for find-all nor replace-all. For example, a common search/replace is to search for
^
or$
to insert something at the start or end of each line. Those are not hanging which is likely why the issue did not get noticed until recently.If I search for
^
or$
though and start tapping F3 to inspect the start or end of each line then npp will hang instead of wrapping from the end of a file to the beginning.^
only hangs if the last line is blank.I hung npp by accident today as I wanted to mark the first 20 characters of each line and used
^{0,20}
rather than^{1,20}
. Fortunately, Notepad++'s background file backup continues to work when it’s hung meaning pretty much all someone is likely to loose is their recent search/replace history and other recent changes to the settings that are stored in config.xml. -
Thank you @Coises & @mkupper for your thought.
It wouldn’t be so bad if it weren’t that it’s a hanging failure — one that requires force closing Notepad++ and hence losing all unsaved work. I made a bad error, and I didn’t discover it in time to fix it for two entire releases. I can only apologize for that, and leave it to others to decide how to minimize the damage.
No problem @Coises
It was me who merged this PR so I take the whole responsibility of the regression.The argument is taken. The v8.7.9 will be retained and v8.8 will be release ASAP.
-
Hi, I just wanted to express my gratitude for your position and support of Ukrainians.
Some time ago I noticed that you use release names to express your position (primarily political but not only). This time while updating Notepad++, I noticed a call for Ukraine support in the release name. Expressing your position in a part of the release name is quite a clever way of doing this.I’m not sure that’s the right category for doing this but couldn’t choose a better one. As a Ukrainian, I want to say thank you for your support and your political position (not only regarding Ukraine). It is of paramount importance you make people pay attention to what’s happening in the world. Again, thank you!
-
@martaisty I agree, this is a pretty awesome idea! I actually forgot there was a war going on.
I’m a new user of Notepad++ and I already love it very much, both the politics and the software itself.
It’s nice to see Don Ho has provided several ways I can help stop this damn war.
As he suggested, I wanted to donate to one of the reliable organizations “Dronators” which is to help Ukraine assemble an army of drones but that project is already over and it’s no longer possible to donate.
Anyways, I don’t think they will need my $50 as the project has collected $1,443,157,017! Impressive, but the war didn’t stop, what a bummer!
In the end I chose to donate to the National Bank of Ukraine which is reliable as it is the national bank of Ukraine. Don Ho says this is to “help people suffering” and funding the military always leads wars to stop, eventually.