Plugin Load Failure in Notepad++ Portable 64-bit on Select Systems
-
Hello Notepad++ Community,
I’m encountering an issue with a plugin not loading in Notepad++ portable 64-bit version on some systems, while it works fine on others. The issue seems to be similar to one discussed in this thread about the Explorer plugin, but with a different plugin.
The plugin in question is NppOpenAI.dll (version 0.2.1.2). It loads without problems in the 32-bit version of Notepad++ portable, but fails in the 64-bit version on a specific Windows 10 LTSC box and also under Windows 11. The exact same Notepad++ directory contents are being used across different machines. Interestingly, the 32-bit version works seamlessly on all tested systems.
Debug Information:
-
32-bit version (working):
Notepad++ v8.6.2 (32-bit)
Build time : Jan 14 2024 - 02:18:41
Path : C:\Tools\npp.8.6.2.portable\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise LTSC 2019 (64-bit)
OS Version : 1809
OS Build : 17763.5328
Current ANSI codepage : 1252
Plugins :
mimeTools (3)
NppConverter (4.5)
NppExport (0.4)
NppOpenAI (0.2.1.2) -
64-bit version (failing to load plugin on some systems):
Notepad++ v8.6.2 (64-bit)
Build time : Jan 14 2024 - 02:16:00
Path : C:\Tools\npp.8.6.2.portable.x64\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise LTSC 2019 (64-bit)
OS Version : 1809
OS Build : 17763.5329
Current ANSI codepage : 1252
Plugins :
mimeTools (3)
NppConverter (4.5)
NppExport (0.4)
Error Message:
Upon starting Notepad++ 64-bit, I receive the following error message:C:\Tools\npp.8.6.2.portable.x64\plugins\NppOpenAI\NppOpenAI.dll The specified module could not be found.
Attempts to Resolve:
- I have made sure that the plugin files are placed correctly in the ‘plugins’ directory.
- I’ve checked for any missing dependencies that the plugin might require, to no avail.
Questions for the Community:
- Has anyone else experienced similar plugin loading issues with Notepad++ portable 64-bit, particularly on Windows 10 LTSC or Windows 11?
- Are there known compatibility issues with certain system configurations that I should be aware of?
- What steps can I take to diagnose or fix this problem?
Any insights or suggestions would be greatly appreciated.
Thank you for your time and assistance.
-
-
@BernoulliBox
Have you opened an issue in the NppOpenAI repo?That’s literally the only piece of advice I can give you. I know nothing about the plugin except that it exists, and that you are more likely to get useful assistance if you tell the maintainer directly.
-
I wasn’t sure if this is a Notepad++ issue with finding/loading DLLs, or some kind of dependency issue with the DLL itself, or some issue with the Windows setup.
I’ve now opened an issue with the author as well, pointing over here, hope that is OK?
-
@BernoulliBox said in Plugin Load Failure in Notepad++ Portable 64-bit on Select Systems:
I wasn’t sure if this is a Notepad++ issue with finding/loading DLLs, or some kind of dependency issue with the DLL itself, or some issue with the Windows setup.
It’s probably that the plugin DLL has a dependency that is available on most, but not all, systems.
There used to be a program called Dependency Walker that was the standard for sorting out such problems, but it doesn’t work properly in Windows 10 and above. There is a newer program, Dependencies, which appears to work in the same way. If you download the 64-bit zip and extract it to a folder, you can then run DependenciesGui.exe from that folder, then find and open the plugin DLL. If it shows that one of the dependencies can’t be found on your system, that’s the problem.
-
Problem solved! Thank you for nudging me in the right direction.
I used the ProcessMonitor app to inspect the DLLs loaded by both the 32 bit and 64 bit versions of NPP and its plugins during startup, and could see that the difference between them was that the 64 bit version (only) failed to load VCRUNTIME140.DLL which is needed by apps and plugins built with Microsoft Visual Studio.
I had actually installed the redistributables earlier, suspecting this problem. However; the ‘gotcha’ that caught me out is that I had failed to note that Microsoft has separate Microsoft Visual C++ Redistributables for 32 and 64 bit architectures…
So, after installing the 64 bit version of the redistributables (as well as the previously installed 32 bit one), NPP and the NpOpenAI plugin both work as they should!
Interestingly, ‘Dependencies’ didn’t spot this. I may have been using it incorrectly.