OpenCV 3.4, CUDA 9.1, WinForms and VS2015 Errors

asked 2018-02-18 18:05:26 -0600

jpistorino gravatar image

I am using OpenCV 2.4 and CUDA 9.1 with VS2015 on a Win10 platform and cannot get my C++/CLI app to run.

While I can get it to compile, it crashes at runtime claiming a heap corruption error.

The app uses WinForms and worked fine using VS2013, CUDA 8.0, and OpenCV 3.3.

As far as I can tell, it is the interaction of CUDA 9.1, OpenCV 3.4 and WinForms that is the issue. This is so because a stand-alone app that uses CUDA 9.1 and OpenCV 3.4 works fine. Likewise, a standard VS2015 WinForms app runs fine.

So, I am wondering if anybody has succeeded in getting the combination of all these things working.

If so, could you share your project configuration?

Any help appreciated.


edit retag flag offensive close merge delete



WinForms is managed code, while OpenCV is unmanaged code. Its a root cause of many headaches and a known issue. I once tried tackling it and gave up after some time, skipping to Qt :D

StevenPuttemans gravatar imageStevenPuttemans ( 2018-02-19 03:10:06 -0600 )edit

Thanks Steve. I guess I am following in your footsteps. Qt it is.

jpistorino gravatar imagejpistorino ( 2018-02-22 23:41:18 -0600 )edit