Skip to content

Fix Notepad++ 7.7x64 hanging for around 10 seconds when expanding the first character in a file#9612

Merged
michaelDCurran merged 3 commits into
nvaccess:masterfrom
BabbageCom:np++
May 23, 2019
Merged

Fix Notepad++ 7.7x64 hanging for around 10 seconds when expanding the first character in a file#9612
michaelDCurran merged 3 commits into
nvaccess:masterfrom
BabbageCom:np++

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented May 23, 2019

Copy link
Copy Markdown
Collaborator

Link to issue number:

Fixes #9609

Summary of the issue:

Notepad++ 7.7 X64 freezes when reading the first character of a file. This is because the logic to expand to textInfos.UNIT_CHARACTER gets stuck in a while loop due to NP++7.7 returning the wrong offset when getting the position after offset -1.

Description of how this pull request fixes the issue:

Restricted the wile loop in such a way that it could never get the position after a negative offset.

Testing performed:

Tested in Notepad++ 7.6 x64, 7.7 x64 and 7.7 x86 that the first character reads fine, whether it is a single or multi byte character.

Known issues with pull request:

We may have to report this bug against scintilla or NP++ as well.

Change log entry:

@DrSooom

DrSooom commented May 23, 2019

Copy link
Copy Markdown

@LeonarddeR: Please also take a look at issue #8563. Maybe it's related.

btw: Did you recognize that the reaction of NVDA is sometimes a little bit slower in Notepad++ portable (7.6.6 and 7.7, 32- and 64-Bit) in compare to the installed Notepad++ 7.6.6 (32-Bit) when pressing CTRL+A? I'm talking about a lag up to one second after pressing the hotkey. And this time all portable versions ran from the same SSD such as the installed version.

@michaelDCurran michaelDCurran merged commit b73e342 into nvaccess:master May 23, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.2 milestone May 23, 2019
michaelDCurran pushed a commit that referenced this pull request May 28, 2019
… first character in a file (#9612)

* Fix Notepad++ 7.7x64 hanging for around 10 seconds when expanding the first character in a file

* Introduce INVALID_POSITION constant

* Update what's new.
@LeonarddeR LeonarddeR added the BabbageWork Pull requests filed on behalf of Babbage B.V. label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BabbageWork Pull requests filed on behalf of Babbage B.V.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NVDA freezes in Notepad++ 7.7

4 participants