How can I resolve a crash with opencv::FindContour()?
I'm working on a project with opencv 2.4.9.
I linked the library and all the functions work fine exept for cv::FindContour(). The exeption thrown is "Access violation writing location 0x00000010". Threads related to this problems exist and suggest raising the stack size. However I can't seem to be able to do this on EU4 projects.
Any idea ? does anyone tried to do this ?
link text here is the source code of my class :
I have found one way. I moved my code with cv::findContours to different project and compiled my own DLL. Then I've linked it in UE4 like opencv and it works.
P.S.: I guess the problem in the vector of vector of Point param and other like it. Garbage Collector from UE4 destroys them (not confirmed).
Yep, I've implemented the same solution and it worked for me too.
Looks like Unreal reflection system doesn't know how to free a vector which has been filled inside an openCV method. In this case FindCountours.
Anyways I was looking for another solution because current one makes us precompile a library for each system/platform we need to use and when developing it becomes a bit annoying to compile the .dll, copy-paste dll, lib and new .h into corresponding directories (source and binary folders). I know I could create a building routine to make all the stuff in one execution, but I've been a little lazy about this and I kept on looking for more possible solutions.
Anybody knows how to tell unreal's reflection system to "ignore" some portion of code? Thanks for the update rNix and if I can find another solution I'll post here as well :-) Best regards, maije
answered Aug 21 '15 at 07:10 AM
Hi evryone. I'm creating a world which uses OpenCV. I'm not sure, but i feel that i found a reason of this issue. All because of unreal's Paper2D plugin's function, there you can check it: https://docs.unrealengine.com/latest/INT/API/Plugins/Paper2D/UPaperSprite/FindContours/index.html
answered Nov 13 '16 at 01:38 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here