Unreal Editor Crashes Due to delayLoadHelper2?

I have a project where I have put two modules into a plugin, one acting as a reference to OpenCV, and the other implements an AActor that stores the images caught on the webcam onto a Texture. It was all working and I had this neat cube with a picture of me on it as I waved to myself (because I’m an idiot). Anyway it doesn’t work now, and I’m not sure why. I hadn’t modified the underlying code at all. The crash message that occurs isn’t very straight forward either.

The error itself seems to occur when I instantiate a cv::VideoCapture object, this delves into OpenCV’s dll and then something called the delayLoadHelper2 comes in to help load OpenCV’s dll, and manages to ruins everything. In addition, the source it references for delayLoadHelper2 is of course in a location that doesn’t exist on my computer, so I have no clue what’s gone wrong. The Crash seems to happen before the project is even done loading.

Just now I was able to get my project to load and run provided I removed all the functionality inside of the heretofore mentioned AActor. This still loads OpenCV into memory as the OpenCVLibraryModule gets loaded. OpenCV is available but it would seem that if anything is loaded to use it, a crash would ensue.

Here’s a (woefully uninformative) partial crash log:

UE4Editor_WebcamMonitorModule!__delayLoadHelper2() [f:\dd\vctools\delayimp\delayhlp.cpp:323]
UE4Editor_WebcamMonitorModule!AWebcamMonitor::AWebcamMonitor() [c:\users\documents\unreal projects\opencvtestbed\plugins\opencv\source\webcammonitormodule\webcammonitor.cpp:19]
UE4Editor_HotReload!FHotReloadClassReinstancer::ReconstructClassDefaultObject() [d:\buildfarm\buildmachine
blah blah blah blah

Any help is appreciated.

Addendum: I moved the offending lines into the BeginPlay function of an AActor class, and it loaded fine, but simulating or playing a scene containing the object crashes Unreal on the same initialization of OpenCV objects. So this is something wrong with the way delayLoadHelper2 is calling functions within the dll. I am thinking perhaps something is wrong about how the OpenCVLibrary module is being put together.
Attached Here is a zipped copy of the present error files that are being generated as of this addendum.

I was wrong.

Okay, after a more scuffling with the Unreal Build System, and making test objects to find out exactly what was going wrong, I realize this question is no longer relevant. The problem is not that I am not accessing the dll, and it’s not a problem with how I’m hosting the library in a module or anything like that.

If you run into problems similar to this, more often than not it’s because you didn’t set up your project, and module definition files right, didn’t set up your target files to include all your modules, or didn’t set the private and public dependencies right, and there is already a dearth of information on setting thoes up. So you should be able to fix your problem there, otherwise I’ll be posting another question that might be more relevant to my and possibly your problem.

The dll’s had gone absent from the project’s binary folder. I copied them back in, and now everything works. I can’t figure how cv::Mat wasn’t having the same trouble as cv:VideoCapture, but that was what went wrong.

I have the same OpenCV problem as your too, delayhlp.cpp and at cv::VideoCapture.
However, for my project, opencv_world300.dll is in \Binaries\Win64.
Could you provide the detail how you solve your problem?
Thanks a lot.

Actually, I cannot provide any more detail than I’ve already given on this page as this took place over a year and a half ago and I had since abandoned the project. I suggest that you go back over your your module and project definition files, ensure that they and their dependencies are configured properly. If the dll is present, and your module for loading the dll is set up properly it should work.