Module 'X' could not be initialized successfully after it was loaded (only on Win64)

Hello!

I am developing an Audio Plugin which consumes a static Third Party Library, and launching the Editor in DebugMode from VS didn’t work.

This Third Party library depends on pthreadVC3 so I had to manually import both the .lib and the .dll into the project. After another try I realized that I had to add pthreadVC3.dll in the Plugin’s binary folder. But still nothing…

The Editor prompts an error message saying:
Plugin 'X' failed to load because module 'X' could not be initialized successfully after it was loaded

and BeginDestroy() in Obj.cpp throws an Unhandled exception thrown: read access violation.

No further info in the Log.
The Plugin is simply Loaded and Unloaded.

Does anyone has any idea about where the problem might be? I there any other log that I could look into?)
By researching on the Internet I can see that it there have been similar problems: sometimes an upgrade is the solution, sometimes a missing library, etc…but nothing works in my case.

The plugin is working on MacOS.

For future reference, IMPLEMENT_MODULE has to be in cpp, but somehow it works fine on MacOS even when you put it in.

8 Likes

Thanks a lot.
same for Linux, it works on Linux without it. Seems to be a windows specific thing to dlls.

the full syntax is
IMPLEMENT_MODULE(FMyModuleStruct, MyModuleName)

2 Likes