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:
KERNELBASE UE4Editor_WebcamMonitorModule!__delayLoadHelper2() [f:\dd\vctools\delayimp\delayhlp.cpp:323] UE4Editor_WebcamMonitorModule!tailMerge_opencv_world310_dll() UE4Editor_WebcamMonitorModule!AWebcamMonitor::AWebcamMonitor() [c:\users\SteamyThePunk\documents\unreal projects\opencvtestbed\plugins\opencv\source\webcammonitormodule\webcammonitor.cpp:19] UE4Editor_HotReload!FHotReloadClassReinstancer::ReconstructClassDefaultObject() [d:\buildfarm\buildmachine++depot+ue4-releases+4.10\engine\source\developer\hotreload\private\hotreloadclassreinstancer.cpp:198] UE4Editor_HotReload!FHotReloadClassReinstancer::RecreateCDOAndSetupOldClassReinstancing() 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.
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.
answered Jan 26 '16 at 02:30 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here