Closed pidgeon777 closed 5 years ago
Thank you for your information! This behaviour could not be reproduced in my environment... I'll do some more research.
First of all, thank you.
I will download your latest x86 release and test it right now in my environment, too.
I've some great news: for somewhat reason, it seems the bug related to the deletion of Favorites.dat is absent from your latest available x86 release of Explorer. This is a bug which led to the incompatibility between Explorer and NppMenuSearch for many years, but now everything seems to work, at last.
I suggest you the NppMenuSearch plugin though, sometimes it is very useful.
@pidgeon777 Thank you for the good news. I got to know the great plugins by your information!!
EDIT: unfortunately I think I spoke too soon, it seems the Favorites.dat file got deleted again...
I'll do more testing, in the meanwhile could you please re-open this issue again?
Thank you.
I confirm that the issue is still present, the bug occurs on Notepad++ exit while configuration files are saved. It seems that for a strange reason, the write to disk function associated to the Explorer plugin collides with NppMenuSearch, leading to a zero bytes write of Favorites.dat.
In my opinion, we should try to investigate the portion of code where the save of Favorite.dat file actually occurs.
@pidgeon777 Thank you for your investigation. I will do a detailed investigation to fix the bug.
You're very kind, Explorer plugin has great potential and it is widely used among the Notepad++ community.
Strange thing is that this bug (overwrite of the plugin configuration file) only happens between NppMenuSearch and Explorer (I use a lot of plugins with no problems).
It seems as if Explorer and NppMenuSearch make use of the same handle/resource assigned by Notepad++ when saving the file, thus writing zero to Favorites.dat. Another option could be that at first the original Favorite.dat loads correctly, then for whatever reason the struct stored in memory gets overwritten and finally written to the disk, as zero. In the end, the result is still an empty file. Just some thoughts of mine.
Feel free consider me as a beta tester! I'll happily help you ;).
In the meanwhile, I've been lucky enough to find the NppMenuSearch source:
https://github.com/peter-frentrup/NppMenuSearch
I also opened an issue in the repository page of NppMenuSearch, with the same description I posted here:
@pidgeon777
This problem occurs when an exception occurs in other plugins when Notepad ++ exits. Other plugin exceptions affected the Explorer.dll termination process. I added a failsafe process and fixed the Explorer.dll to finish successfully.
this is release candidate version. Explorer_x64.zip Explorer_x86.zip
I really appreciate your help in resolving the problem. Best regards.
First of all: brilliant work.
I've tested your latest release for the past hours, and so far, so good.
I have got a question, though: you said that apparently Favorites.dat overwrite occurred due to a plugin exception, which prevented that file to be correctly saved. Is there a way to know which plugin caused the exception?
It would be great for me to know about that so that I could investigate further.
Thanks again!
thank you for your support!
Is there a way to know which plugin caused the exception?
I'll research the plugin. I will contact you when I know the details :)
This is great to know. Hopefully, you could share some method with us for detecting which plugin caused an exception :).
The exception that I thought was the cause of the problem was irrelevant to the problem. // 0x7787C762 (KernelBase.dll) throws an exception (in notepad++.exe): 0x000006BA: The RPC server is unavailable. In my environment, it happened even when I was able to save my favorites normally.
This problem seems to occur only when using NppMenuSearch.dll and Explorer.dll simultaneously. I tried to debug Notepad++.exe and NppMenuSearch.dll, but neither of them raised an exception.
This issue is due to the Explorer.dll termination process.
Excellent explanation. Thank you again!
With the original version of the Explorer plugin, which is displayed here:
the Favorites.dat file managed through the Favorites panel always got deleted when also enabling the NppMenuSearch plugin. You can read more here:
https://sourceforge.net/p/nppmenusearch/bugs/13/
Is your plugin version also affected by this unwanted behaviour?