Open
Description
Operating System and Version
archlinux, master branch
Distribution
qmake6 src/NotepadNext.pro
Description
after fixing #752 by hand, NotepadNext, utilizing the SingleApplication library, does not properly handle stale lock files left behind after an unclean shutdown (e.g., via Ctrl+C or crash). This results in subsequent launches incorrectly detecting a "primary instance already running," preventing the application from starting until lock files are manually removed.
Steps to Reproduce
- Launch NotepadNext from a terminal (./NotepadNext).
- Close the application uncleanly, e.g., by pressing Ctrl+C in the terminal or simulating a crash (e.g., kill -9 ).
- Attempt to launch NotepadNext again.
- Observe the error log:
[ 1.106] I: Primary instance already running. PID: <previous_pid>
[ 1.211] W: sendMessage() unsuccessful
- The secondary instance exits without starting the application.
Manually remove lock files:
sudo rm /dev/shm/NQd7ehOB89VHFdGSy2fPICYNWen1ylD7GZQtd_a754Q=
sudo rm /tmp/NQd7ehOB89VHFdGSy2fPICYNWen1ylD7GZQtd_a754Q=
Relaunch NotepadNext, which now starts successfully as the primary instance.
Debug Information
Notepad Next v0.11
Build Date/Time: May 11 2025 11:31:32
Qt: 6.9.0
OS: Arch Linux
Locale: en_US
CPU: x86_64
File Path: /usr/bin/NotepadNext
Arguments: NotepadNext
Config File: /home/kreijstal/.config/NotepadNext/NotepadNext.ini
Additional Details
e.g. screenshots, logs, etc