Comments (7)
It's an issue concerning Scintilla
The symptoms sound like Notepad++ isn't catching an exception that it should (see #4761 (comment)).
Anyway, if it is really thought to be a Scintilla issue, why not update Scintilla and see if it remains. :-)
from notepad-plus-plus.
Interesting bug. Replicated easily (v6.7.7). Confirmed that only happens after exactly 380 characters. Bug not present if () removed; (a)*b
gives bug but a*b
does not even after 200,000 characters.
Suspect memory/storage issue of () capturing group?
from notepad-plus-plus.
Oddly enough I get the bug after 270 characters.
from notepad-plus-plus.
It appears to be an issue with Scintilla, as I was able to reproduce a similar behaviour in SciTE by dropping in SciLexer.dll v3.3.4 (which Notepad++ v6.7.7 is using) in place of v3.5.5.
When I place SciLexer.dll v3.5.5 in the same directory as Notepad++, I no longer see the issue, even with 200,000 "a"s in a row. Not that SciLexer.dll v3.5.5 is perfect though, as it seems to fail to match (a)*
, or a more useful regex such as (a|b)*
in both Notepad++ and SciTE...
Edit: Note I don't know whether SciLexer.dll v3.5.5 was built with boost for PCRE support. I simply took SciLexer.dll from the SciTE binary download. I don't have time to check right now.
from notepad-plus-plus.
Hello Zantier, tommilligan, jonandr and All,
I did some tests, on a 6.7.9 version, with its native plugins, and I found out a strange rule about that regex issue ! Follow the few steps below, to reproduce it :
- Let's suppose that you write, in a new tab, a line with several lower letters a ( let's say, for instance, between 10 and 20 )
- Then, just add some lines, even empty, before and after this line of a's letters, with the two following conditions :
-
They don't contain any lower letter a or b
-
If your select all the contents of that test file, you get, exactly, 285 characters
- Go back to the very beginning of the file ( CTRL + Origin )
- Open the Find dialog
- Check the Match case option and the Regular expression radio button
- Uncheck the option Wrap around
- Type the Zantier's regex
([^b])*b
in the Find what zone
=> When clicking on the Find Next button, you wrongly get the entire contents of this test file :-(
Now, :
- Close the Find dialog , hitting the ESC key
- Delete ONE character ONLY, in a line, located before, or even after, the line of a's ( so, if you hit CTRL-A, you get, exactly, a 284 characters selection )
- Go back, again, to the very beginning of the file, with the CTRL + Origin shortcut
- Type on the F3 key to repeat the same regex search
([^b])*b
=> This time, the regex engine, doesn't find, as expected, any matched string ( as the file contains NO lower letter b )
So, for some odd reasons, this regex doesn't work, as soon as the size of the file is > 284 bytes ???
Then, I replace, successively, the SciLexer.dll v3.5.6 file by :
- The last version of SciLexer.dll v3.3.4 ( which came with N++ 6.7.3 ) => Same limit, between 284 and 285
- The last version of SciLexer.dll v2.2.7 ( which came with N++ 6.3.0 ) => The limit is between 269 and 270
BTW, the regex ([^b])+b
produces the same issue, but, luckily, the regexes ([^b]*)b
( that, however, creates a different group 1 ) and the regex [^b]*b
, do work, in all cases, independently of the file"'s size !
Best regards,
guy038
from notepad-plus-plus.
Has anyone reported this on the Scintilla bug system?
from notepad-plus-plus.
It's an issue concerning Scintilla.
from notepad-plus-plus.
Related Issues (20)
- [BUG] Neither [[:upper:]] nor [[:lower:]] function without ‘Match case’ selected HOT 1
- [BUG] fold_in folds to much !
- [BUG] Clear All Marks Has Different Behavior HOT 1
- [Feature request] Remove horizontal white space HOT 1
- [BUG] Multi-editing not showing multiple cursors HOT 4
- [Feature request] More than one bookmark color HOT 2
- [BUG] Custom draw not working in TreeView controls inside plugins
- Issue with Foxpro for DOS
- [BUG] Verical Edge Incorrect HOT 4
- [BUG] Lua: cannot add additional styles HOT 1
- [BUG] "In all sub-folders" when searching does not go through all sub-folders HOT 3
- Use DIR_O in nppSpecifics.mak properly
- Feature Request: Adding Strike-Through Option for Lines HOT 2
- Try don't use the REST API to get PR message in CI build
- [Feature request] Add user-defined tag or attribute names to HTML parser
- [BUG] No file/tab to "left" or "right" when using Document List
- [BUG] Improper item enabling when "Close Multiple Documents" menu is shown
- [BUG] Find & Replace dialog vertical resize arrows
- [Feature request] Simplify Macro warning message on upgrade
- [Feature request] Redirect to open the same file when using multiple windows (multiple instances)?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notepad-plus-plus.