-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix crash during Search result #11889
Conversation
I have reproduced the crash, and fixed it (hopefully). |
@Yaron10 |
The crash was not consistent (about 1 of 10 NPP startups). Thank you for looking into it. |
Positive. I might be wrong, but the crash seems to happen more frequently in NPP x32 (in x64 system). |
Could you please try reproducing the crash on your machine? |
Crash still exist:
|
Thank you. |
@Yaron10 @ArkadiuszMichalski Could you provide a way to reproduce crash steadily please? |
If crash not happend after two searches close and run NPP again and repeat above steps. Currently I get crash after first run. |
@ArkadiuszMichalski Edited: |
@xomx Try with version from this PR (looks like it breaks more often than the official one). If after catching a crash and after a few attempts, there is still no crash, try run system again (in the past I had a case that after a few crashes in NPP they stopped appearing until the system restarted). |
That's the problem: it's inconsistent and can not be reproduced steadily. You're trying to separate the crash from the wrong lexing. - Your knowledge and understanding are better than mine. @ArkadiuszMichalski has mentioned an important point:
And also, try it with the x32 build. Thank you. |
It should be more stable though. In anyway, I believe it doesn't contribute to the crash.
Yes, now I can reproduce the crash with x86 official release. However, in debug mode (the same source code) I can see the syntax highlighting is lost, but no crash at all. It seems it's rather the race condition on Scintilla - the execution on debug binary is much slower; since Scintilla is not thread safe, when the execution speeds up, there might be several accesses to Scintilla, which lead crash. Since I cannot find the crash reason from the debug, I'll revert 0b5785c to see if the crash still happens. |
Found it! |
The crash should be fixed in the latest commit. |
And the lexing in "Find All in Current Document" is broken. |
@Yaron10 |
Crash was fixed. |
@ArkadiuszMichalski @Yaron10
Indeed, it's not necessary to revert this PR. |
That's great.
There's a performance issue in the first search too. :)
👍 |
Fix #11883 partially.