[BUG] DLL missing from computer (again)

I asked a similar question before about a missing project DLL, but that was more about the UnrealBuildTool and got resolved. However, it seems that every project I work on in UE4 eventually gets to this state where I cannot even open the .uproject file, and I decided once and for all to figure out the “correct” way to do things to make sure this never happens.

First off, I have the following project setup:

ParseProj/
├── Binaries/
│   └── Win64/
│       └── RocketEditor-ParseProj.dll
├── Intermediate/
├── Plugins/
│   └── ParsePlugin/
│       ├── Binaries/
│       │   └── Win64/
│       │       └── RocketEditor-ParsePlugin.dll
│       ├── Intermediate/
│       ├── Source/
│       │   └── ParsePlugin/
│       │       ├── Private/
│       │       ├── Classes/
│       │       ├── Public/
│       │       └── ParsePlugin.Build.cs
│       ├── Resources/
│       └── ParsePlugin.uplugin
├── Source/
│   ├── ParseProj/
│   │   ├── Private/
│   │   ├── Classes/
│   │   ├── Public/
│   │   ├── Resources/
│   │   └── ParseProj.Build.cs
│   ├── ParseProj.Target.cs
│   └── ParseProj.Target.cs
└── ParseProj.uproject

There are of course more directories and files like Cloud, but I don’t think they’re relevant to this issue.

Suppose I have some code (both in the main ParseProj and ParsePlugin) that compiles correctly in Visual Studio using the Development Editor configuration. To perform a “clean build”, I:

  1. delete the Binaries/ and Intermediate/ directories from both the main project and plugin subdirectory.
  2. right-click ParseProj.uproject and select “Generate Visual Studio Files”
  3. in Visual Studio, right-click my project in the Solution Explorer and select “Rebuild”

This succeeds with 0 errors. After compilation, I have RocketEditor-ParseProj.dll and RocketEditor-ParsePlugin.dll at the locations specified in the above tree.

Now I try to open my ParseProj.uproject and get the following:

parse-error-1.jpg

parse-error-2.jpg

In my log, the following:

[0025.69][  1]LogModuleManager:Warning: ModuleManager: Unable to load module '../../../../../Users/William/Documents/Rocket Projects/ParseProj/Binaries/Win64/RocketEditor-ParseProj.dll' because the file couldn't be loaded by the OS.

Note that this says nothing about the plugin DLL not being found, but I assume the log is being terse about the issue.

I have tried several things to resolve this issue, all to no avail:

  • Using a different build configuration. As detailed in [another one of my questions][3], this causes -Win64-Debug to be added to file names and creates another issue altogether. So Development Editor is the way to go.
  • Moving RocketEditor-ParsePlugin.dll to ParseProj/Binaries/Win64/ manually, which used to resolve this issue in a previous Rocket build (but which also didn’t make sense). This now causes the editor to rightly complain about duplicate DLLs.

So, apologies for the all-caps, but WHAT IS GOING ON HERE?

I’d like to be able to open my project so I can test my code. Please let me know how I can resolve this issue and prevent it from occurring again. If you need any of my files I will be happy to provide them on the Dropbox. Thanks in advance!

Hi William,

This is with Rocket Beta 6 (version 1945001), correct?

Sorry, forgot to include build info. This question was originally for 1904627, but the problem persists in Beta 6.

It sounds like there’s an implicit dependency on the plugin from the game module, but the plugin isn’t being loaded before the game DLL is loaded.

Copying the plugin DLL into the game binaries directory would allow Windows to load it automatically, though it sounds like the engine doesn’t like it if it sees two DLLs with the same name. That check probably happens before it tries to load any of them.

You might need to change the point during engine startup that the plugin is loaded. In your ParsePlugin.uplugin file, try adding a “LoadingPhase” line to the modules section like this:

"Name": "ParsePlugin",
"LoadingPhase": "PreDefault"

If that doesn’t work, feel free to upload it to Dropbox and I’ll take a closer look.

Sorry, that does not fix the problem. I have uploaded my ParseProj directory to the Dropbox, you will find it under William_Gaul\ParseProj.zip.

Also, yes my game has a static dependency on the plugin. In ParseProj.Build.cs: PrivateDependencyModuleNames.AddRange(new string[] { "ParsePlugin" });

Thank you so much for your help!

It looks like your zip was deleted while we were away over the holidays. Could you upload it again?

Thanks for letting me know. I have re-uploaded it.

Sorry for the delay getting back to you.

You need to add a couple of lines into your ParseProj/Config/DefaultEngine.ini file to tell the engine that the plugin’s enabled and needs to be loaded:

[Plugins]
+EnabledPlugins=ParsePlugin

Without those lines, Windows is just automatically trying to load the DLL from the application directory because there’s a linker dependency on it. It can’t find it and gives you the system error dialog that you see.

Apologies for the lack of documentation on this; it’s still very much in development.

Thank you, that worked perfectly!

And I completely understand on the documentation part, especially dealing with the plugin system. Just glad to know this problem finally has a solution :slight_smile: