x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Potential bug in plugin search paths on Windows?

I went to go package my game which uses a plugin and got the following error:

LogWindows: LoadLibraryWithSearchPaths failed for file D:/Games/Epic Games/Projects/GameName/Plugins/PluginName/Binaries/Win64/UE4Editor-PluginName-7396.dll. GetLastError=126 LogWindows: FileExists returned 1 for Module D:/Games/Epic Games/Projects/GameName/Plugins/PluginName/Binaries/Win64/UE4Editor-PluginName-7396.dll

So we see LoadLibraryWithSearchPaths() fails (later, you can see the proper location is in the full list of search path), and FileExists() returns true (1). The GetLastError() is Windows code for ERROR_MOD_NOT_FOUND.

So I investigated why it could not be found. I believe this may be because of forward slashes. See the following cmd.exe with forward slashes (fails) and backward slashes (file is found).

Forward Slashes (not found, fails):

C:\Windows\System32>dir "D:/Games/Epic Games/Projects/GameName/Plugins/PluginName/Binaries/Win64/UE4Editor-PluginName-7396.dll" Volume in drive D is BIGSTORAGE Volume Serial Number is 141A-DB2C

Directory of D:\Games\Epic Games\Projects\GameName\Plugins\PluginName\Binaries\Win64

File Not Found

Backward slashes (found, works):

C:\Windows\System32>dir "D:\Games\Epic Games\Projects\GameName\Plugins\PluginName\Binaries\Win64\UE4Editor-PluginName-7396.dll" Volume in drive D is BIGSTORAGE Volume Serial Number is 141A-DB2C

Directory of D:\Games\Epic Games\Projects\GameName\Plugins\PluginName\Binaries\Win64

09/23/2017 07:17 PM 264,704 UE4Editor-PluginName-7396.dll 1 File(s) 264,704 bytes 0 Dir(s) 119,722,176,512 bytes free

This looks like the cause of the bug, but I can't imagine I'm the first to run into this problem? Maybe there is something else going on?

From MSDN on LoadLibrary():

If the function cannot find the module, the function fails. When specifying a path, be sure to use backslashes (), not forward slashes (/).

The debug spew does show this in the search paths though...

LogWindows: D:\Games\Epic Games\Projects\GameName\Plugins\PluginName\Binaries\Win64

Product Version: UE 4.17
Tags:
more ▼

asked Sep 24 '17 at 08:42 AM in Packaging & Deployment

avatar image

zerosum0x0
36 2 4 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question