Comments (17)
@donho
If I understand it correctly, they are using Citrix terminal server with N++ installed only there (this is a bliss from the SW maintenance POV...). So the users' computers are just dumb terminals there, all their programs are installed and run on the terminal server side. And if the server is not from Dell, the Support Assistant should not be there either.
from notepad-plus-plus.
Is this the info you wanted to see
No no, the PRECEDING line:
from notepad-plus-plus.
@junk430
I have an idea how we could detect what is happening there.
There is already a debugging code for the relevant file output opening CreateFileW WINAPI call but currently it is activated only during the Windows OS shutdown/reboot/logoff phase:
notepad-plus-plus/PowerEditor/src/MISC/Common/FileInterface.cpp
Lines 77 to 85 in 6cd6aa3
So you can try to:
- ensure that your installation of N++ has the
nppLogNulContentCorruptionIssue.xml
zero-sized logging-trigger file in the same dir, where the main notepad++.exe file is (yours seems to be "D:\Program Files\Notepad++\") - launch single instance of the N++ (there is no need to have any files opened in it, but as you like)
- while the N++ is still running, initiate the Windows restart (or shutdown or logoff, as you like)
- after getting back to a Windows session, check for the
%APPDATA%\Notepad++\nppLogNulContentCorruptionIssue.log
file and post its content here, if working ok it should look like:
2024-06-03 17:16:27 WM_QUERYENDSESSION (lParam: 1 - ENDSESSION_CLOSEAPP) =====================================
2024-06-03 17:16:27 WM_ENDSESSION (wParam: TRUE, lParam: 1 - ENDSESSION_CLOSEAPP)
2024-06-03 17:16:27 C:\Users\USERNAME\AppData\Roaming\Notepad++\config.xml is opened.
2024-06-03 17:16:27 C:\Users\USERNAME\AppData\Roaming\Notepad++\config.xml 8898/8898 bytes are written.
2024-06-03 17:16:27 C:\Users\USERNAME\AppData\Roaming\Notepad++\config.xml is closed.
2024-06-03 17:16:27 C:\Users\USERNAME\AppData\Roaming\Notepad++\session.xml is opened.
2024-06-03 17:16:27 C:\Users\USERNAME\AppData\Roaming\Notepad++\session.xml 824/824 bytes are written.
2024-06-03 17:16:27 C:\Users\USERNAME\AppData\Roaming\Notepad++\session.xml is closed.
2024-06-03 17:16:27 WM_DESTROY (isEndSessionStarted == true)
One more thing - as you stated, your problem just have recently started. You connected it to a Windows upgrade. But for surety - do you by any chance having also the Dell Support Assistant SW installed on your computers (check if you have the C:\Program Files\Dell\SupportAssistAgent\SRE\SRE.exe
on your disk)?
From approx. January, we have started to receive user complaints about missing N++ session.xml. It turns out that around this time this Dell SW was upgraded to a version that actively deletes also this N++ file, more on that e.g. here.
from notepad-plus-plus.
@xomx Correct. Citrix/Terminal Server, Virtual Apps deployment, Notepad++ instilled on Server 2019 terminal server users access.
I RDP'd into one of the servers, ran N++ and rebooted computer. I got the blue screen saying this app is preventing shutdown so I forced. Screen shot included
2023-10-27 10:04:01 WM_QUERYENDSESSION (lParam: 3221225472 - ENDSESSION_CRITICAL - ENDSESSION_LOGOFF) =====================================
2023-10-27 10:04:01 WM_ENDSESSION (wParam: TRUE, lParam: 3221225472 - ENDSESSION_CRITICAL - ENDSESSION_LOGOFF)
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml is opened.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml 8120/8120 bytes are written.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml is closed.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\session.xml is opened.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\session.xml 193/193 bytes are written.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\session.xml is closed.
2023-10-27 10:04:02 WM_DESTROY (isEndSessionStarted == true)
2024-06-05 12:40:06 WM_QUERYENDSESSION (lParam: 3221225472 - ENDSESSION_CRITICAL - ENDSESSION_LOGOFF) =====================================
2024-06-05 12:40:06 WM_ENDSESSION (wParam: TRUE, lParam: 3221225472 - ENDSESSION_CRITICAL - ENDSESSION_LOGOFF)
2024-06-05 12:40:06 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml is opened.
2024-06-05 12:40:06 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml 8271/8271 bytes are written.
2024-06-05 12:40:06 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml is closed.
2024-06-05 12:40:06 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\session.xml failed to open, CreateFileW ErrorCode: 32
from notepad-plus-plus.
Perfect, it works, I will format the log for better readability:
2023-10-27 10:04:01 WM_QUERYENDSESSION (lParam: 3221225472 - ENDSESSION_CRITICAL - ENDSESSION_LOGOFF) =====================================
2023-10-27 10:04:01 WM_ENDSESSION (wParam: TRUE, lParam: 3221225472 - ENDSESSION_CRITICAL - ENDSESSION_LOGOFF)
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml is opened.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml 8120/8120 bytes are written.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml is closed.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\session.xml is opened.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\session.xml 193/193 bytes are written.
2023-10-27 10:04:02 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\session.xml is closed.
2023-10-27 10:04:02 WM_DESTROY (isEndSessionStarted == true)
2024-06-05 12:40:06 WM_QUERYENDSESSION (lParam: 3221225472 - ENDSESSION_CRITICAL - ENDSESSION_LOGOFF) =====================================
2024-06-05 12:40:06 WM_ENDSESSION (wParam: TRUE, lParam: 3221225472 - ENDSESSION_CRITICAL - ENDSESSION_LOGOFF)
2024-06-05 12:40:06 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml is opened.
2024-06-05 12:40:06 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml 8271/8271 bytes are written.
2024-06-05 12:40:06 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\config.xml is closed.
2024-06-05 12:40:06 \hometown.local\UserFolders\FolderRedirection\Jack.Hanna\AppData\Roaming\Notepad++\session.xml failed to open, CreateFileW ErrorCode: 32
Here is the relevant info for the ErrorCode 32:
ERROR_SHARING_VIOLATION - The process cannot access the file because it is being used by another process.
Edited:
And look into the log - there are two instances of the N++ app Sorry, the correct first one is from the previous year.
The log says that the N++ session.xml file is already being used by someone else and it cannot be another N++ instance as the N++ uses dwAccessParam = GENERIC_READ | GENERIC_WRITE
and dwShareParam = FILE_SHARE_READ | FILE_SHARE_WRITE
, so even with multiple Notepads++ trying to write to that file at the same time it should proceed... Moreover the N++ design allows only the 1st N++ instance running to save to that session.xml file at its exit.
It looks like that some other process than N++ on that terminal server has opened the N++ session.xml file with exclusive access rights.
from notepad-plus-plus.
To identify the culprit:
- launch the N++
- launch the Windows Resource Monitor app
- switch to its "CPU" tab
- input the "session.xml" in to the "Search Handles" edit field in the "Associated Handles" and wait for the search to complete
from notepad-plus-plus.
Very interesting..
I tried several times searching for session.xml with Notepad++ open. I even closed Notepad++ in order to generate the error but still nothing shows up in the search for session.xml.
I've also noticed I can't reproduce this in my QA environment that "should" be the same as my prod. Same OS, Citrix, ect.
I'm having a look in PowerTools to see if I can capture anything and I know I've used some apps in the past that would log all changes/IO ect from apps or to files ect.. let me see if I can find something like that.
Wanted to add, thanks so much for your time and help!
from notepad-plus-plus.
@junk430
Could you check if %APPDATA%\notepad++\session.xml
is read-only for your users?
from notepad-plus-plus.
The file was created by the user when Notepad++ was run. session.xml is owned by the user and has full control on the file.
from notepad-plus-plus.
Thanks for the reply!
I'll work on getting this ASAP.
This does seem related to upgrading the Citrix servers from 2012R2 to 2019. We also have CIS security policy mandated. So it's possible something in there could be causing this.. but N++ is initially creating this file correct so it has R/W..
We do not use Dell servers.
from notepad-plus-plus.
We do not use Dell servers.
It's not about Dell Server but Dell's laptop/computer.
If your company use Dell's computers/laptops, SupportAssist could be installed by default in your users laptops/computer, and it causes the session saving problem.
from notepad-plus-plus.
I might have something.. I used Process Monitor to capture a log while I open and close N++. I can see it open cleanly but when closing there are file errors. I'm not sure if a screen cap with info redacted will help.
The both are filtering sessions.xml. The first one is when N+ is opened. The 2nd pic is after it's closed.
See if this works. this WYSIWYG editor keeps adding 3 pictures at a time.
from notepad-plus-plus.
@junk430
Good, I would recommend the ProcMon to you myself.
but when closing there are file errors
If you mean that BUFFER OVERFLOW
s, it is most probably ok. These usually means that a process/call requests some data whose length it does not know beforehand (e.g. you start with some initial buffer size, if it is too small, this BUFFER OVERFLOW status is returned along with the current buffer size needed, and the process/call can reissue the request but now with the correct buffer size, this is a common programming pattern in the WIN32 API world). And before your log line with the BUFFER OVERFLOW
is visible some QueryDeviceInfo
op...
Use these ProcMon filters only and watch:
from notepad-plus-plus.
from notepad-plus-plus.
I'm still checking the config between QA and Prod but I'm not seeing a difference. I'll see if I can reproduce this in a test environment.
from notepad-plus-plus.
This is what I've got when I just opened & closed my testing N++, no such problem visible:
From you log-pic is visible that the session.xml CreateFile is used there with different params than mine (Delete, Write DAC...).
Could you show us also the detail of the line preceding the one with the SHARING VIOLATION visible?
We have folder redirection set to a network share
What network storage is used for your folder redirection? (format of the drive, is it a heterogeneous *nix storage, etc...?)
I cannot reproduce your problem even when I redirected my %APPDATA%\Roaming\
to another disk (tested with some local exFAT and NTFS drives, but not with a network drive).
from notepad-plus-plus.
Again thanks so much for your effort.
Is this the info you wanted to see. If not let me know. I wish this was a system where I could upload the capture but that's not possible and I can't reproduce it in my QA env.
The only thing I can think that is different is how the Roaming profiles are redirected. 1 is using a User setting and the other a Computer setting in Group Policy. Let me see if I can configure my test env like this one and reproduce the error.
The redirect is to a SMB share on a Windows server NTFS formatted drive. Permissions set per the MS doc that outlines Roaming Profile shares. The profiles are being redirected using Group Policy with Citrix Profile management added. Or at least feels like it could be related.
from notepad-plus-plus.
Related Issues (20)
- [BUG] Encoding + Conversion Problem HOT 28
- [BUG] Highlighting issue using SQL HOT 2
- [Feature request] Auto-hide or Show-on-hover close buttons on each tab (Visual/UI feature) HOT 2
- [BUG] <build error>
- [BUG] Invalid Regular Expression (due to complexity it exceeds the predefined bounds)
- [Feature request] Search-> "Mark"...: add more actions HOT 3
- [BUG] <With 2 screen the app open only in 2 screen> HOT 1
- [BUG] Runas NP from different user fails to open file with error dialog `Cannot open file` `Folder "..." doesn't exist` HOT 2
- [BUG] Notepad++ can't display most characters at the Unicode block "Number Forms" HOT 1
- [Feature request] Templates for Rename/Replace-Dialog to store pattern for re-use HOT 2
- [Feature request] Internal command to repeat the last used command
- [BUG] The regular notepad.exe opens notepad++.exe instead HOT 2
- [Feature request] Folder as Workspace is not immediately intuitive
- [BUG] Double Question Mark disappears when I remove Full Width Question Mark [VIDEO] HOT 1
- [Feature request] FaW: option to quickly close necessary FaWs
- [BUG] The width of the characters become narrower after "DirectWrite" is enabled HOT 3
- [BUG] App-V Deployment Context Menu Issue HOT 3
- [BUG] Convert to ANSI | UTF-8 HOT 4
- Search window does not appear HOT 10
- Please move Notepad++ to a non-GPL license. Richard Stallman is extremely repulsive. HOT 2
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.