Skip to content
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

Fixes for the npp backup thread #15031

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xomx
Copy link
Contributor

@xomx xomx commented Apr 23, 2024

Fix #14906 .

This PR fixes:

  • possible backup thread deadlock exception (re-entering the std::mutex from the same thread)
  • possible thread message queue flooding by the multiple PostMessages when a backup IO is blocked somehow or takes a longer time than the backup period set
  • unhandled backup worker thread closing at the very Notepad++ exit (e.g. in the nppLogNulContentCorruptionIssue.log you can sometimes see that the backup thread is still running & doing its job even in the very last stages of the Notepad++ app existence, which is IMO not completely safe...)

extend std::mutex by thread-safe lockCount() and isOwner() methods
fixes:
- possible deadlock exception (re-entering the std::mutex from the same thread)
- possible thread message queue flooding by the multiple PostMessages when a backup IO is blocked somehow or takes a longer time than the backup period set
- unhandled backup worker thread closing at the Notepad++ exit
@donho
Copy link
Member

donho commented May 6, 2024

Currentely #14906 cannot be reproducible, so the PR is on standby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash issue causing N++ to crash suspended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

possible crash when recursively entering the Notepad++ backup_mutex
3 participants