I get the following error when running OpenCV via nodejs in a Docker container on GKE, but don't experience the issue when running the same container on my Mac.
Is this some sort of memory issue? Only the node process crashes.
OpenCV Error: Bad argument (Invalid cascade pointer) in cvRunHaarClassifierCascadeSum, file /tmp/opencv-2.4.11/modules/objdetect/src/haar.cpp, line 838
OpenCV Error: Bad argument (Invalid cascade pointer) in cvRunHaarClassifierCascadeSum, file /tmp/opencv-2.4.11/modules/objdetect/src/haar.cpp, line 838
OpenCV Error: Null pointer (Hidden cascade has not been created.
Use cvSetImagesForHaarClassifierCascade) in cvRunHaarClassifierCascadeSum, file /tmp/opencv-2.4.11/modules/objdetect/src/haar.cpp, line 843
OpenCV Error: Bad argument (Invalid cascade pointer) in cvRunHaarClassifierCascadeSum, file /tmp/opencv-2.4.11/modules/objdetect/src/haar.cpp, line 838
terminate called after throwing an instance of 'tbb::captured_exception'
what(): /tmp/opencv-2.4.11/modules/objdetect/src/haar.cpp:838: error: (-5) Invalid cascade pointer in function cvRunHaarClassifierCascadeSum
The issue was with the NodeJS library Faced. I used the Node OpenCV library instead.
Related
I am having an annoying problem while launching unreal-engine. I installed it from the AUR, the game is installed in directory /opt/unreal-engine. Here is the log messages. I am still a beginner on both linux and unreal-engine, so guide me with easy to follow steps. Thanks.
LogUnixPlatformFile: Warning: create dir('/opt/unreal-engine/Engine/Saved/Config/Linux/Manifest.ini') failed: errno=13 (Permission denied)
LogUnixPlatformFile: Warning: create dir('/opt/unreal-engine/Engine/Saved/Config/Linux/Manifest.ini') failed: errno=13 (Permission denied)
LogUnixPlatformFile: Warning: create dir('/opt/unreal-engine/Engine/Saved/Config/CrashReportClient/UE4CC-Linux-F9CC0BA4D1E046998DB4DD29DC904FC3/CrashReportClient.ini') failed: errno=13 (Permission denied)
LogUnixPlatformFile: Warning: create dir('/opt/unreal-engine/Engine/Saved/Config/CrashReportClient/UE4CC-Linux-F9CC0BA4D1E046998DB4DD29DC904FC3/CrashReportClient.ini') failed: errno=13 (Permission denied)
[2020.02.05-06.48.13:587][ 0]LogUnixPlatformFile: Warning: open('/opt/unreal-engine/Engine/DerivedDataCache/8729777EB19D4DDAA2910A8040E24FC5.tmp', Flags=0x00080041) failed: errno=13 (Permission denied)
[2020.02.05-06.48.13:587][ 0]LogUnixPlatformFile: Warning: open('/opt/unreal-engine/Engine/DerivedDataCache/8729777EB19D4DDAA2910A8040E24FC5.tmp', Flags=0x00080041) failed: errno=13 (Permission denied)
[2020.02.05-06.48.13:587][ 0]LogDerivedDataCache: Warning: Fail to write to ../../../Engine/DerivedDataCache, derived data cache to this directory will be read only. WriteError: 0 (errno=2 (No such file or directory)) ReadError: 0 (errno=2 (No such file or directory))
[2020.02.05-06.48.13:587][ 0]LogDerivedDataCache: Warning: Local data cache path (../../../Engine/DerivedDataCache) was not usable, will not use it.
[2020.02.05-06.48.13:587][ 0]LogDerivedDataCache: Unable to find inner node Local for hierarchical cache Hierarchy.
[2020.02.05-06.48.13:587][ 0]LogDerivedDataCache: Shared data cache path not found in *engine.ini, will not use an Shared cache.
[2020.02.05-06.48.13:587][ 0]LogDerivedDataCache: Unable to find inner node Shared for hierarchical cache Hierarchy.
[2020.02.05-06.48.13:612][ 0]LogMaterial: Verifying Global Shaders for SF_VULKAN_SM5
Fatal error: [File:/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 1253]
Could not create the shader compiler transfer file '/opt/unreal-engine/Engine/Intermediate/Shaders/tmp/DD11AF6A45C44C8586192EE55DBE07C0/0A2ADC10248884539A8A1054157AD3D00'.
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=439632 LargeMemoryPoolOffset=570768
Malloc Size=330840 LargeMemoryPoolOffset=901624
[2020.02.05-06.48.37:669][ 0]LogCore: === Critical error: ===
Unhandled Exception: SIGSEGV: invalid attempt to write memory at address 0x0000000000000003
[2020.02.05-06.48.37:669][ 0]LogCore: Fatal error: [File:/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 1253]
Could not create the shader compiler transfer file '/opt/unreal-engine/Engine/Intermediate/Shaders/tmp/DD11AF6A45C44C8586192EE55DBE07C0/0A2ADC10248884539A8A1054157AD3D00'.
0x00007f76dd8d93f0 libUE4Editor-Engine.so!FShaderCompileThreadRunnable::CompilingLoop() [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:1513]
0x00007f76dd8d45a9 libUE4Editor-Engine.so!FShaderCompileThreadRunnableBase::Run() [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:1078]
0x00007f76e0202167 libUE4Editor-Core.so!FRunnableThreadPThread::Run() [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
0x00007f76e01c9a00 libUE4Editor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:177]
0x00007f76e0cc54cf libpthread.so.0!UnknownFunction(0x94ce)
0x00007f76d7a792d3 libc.so.6!clone(+0x42)
0x00007f76e0197af6 libUE4Editor-Core.so!FGenericPlatformMisc::RaiseException(unsigned int) [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformMisc.cpp:477]
0x00007f76e03abd97 libUE4Editor-Core.so!FOutputDevice::LogfImpl(char16_t const*, ...) [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Core/Private/Misc/OutputDevice.cpp:71]
0x00007f76dd8d5b15 libUE4Editor-Engine.so!FShaderCompileThreadRunnable::WriteNewTasks() [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:1253]
0x00007f76dd8d93f0 libUE4Editor-Engine.so!FShaderCompileThreadRunnable::CompilingLoop() [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:1513]
0x00007f76dd8d45a9 libUE4Editor-Engine.so!FShaderCompileThreadRunnableBase::Run() [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:1078]
0x00007f76e0202167 libUE4Editor-Core.so!FRunnableThreadPThread::Run() [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
0x00007f76e01c9a00 libUE4Editor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/home/utkarsha/Applications/unreal-engine/src/unreal-engine/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:177]
0x00007f76e0cc54cf libpthread.so.0!UnknownFunction(0x94ce)
0x00007f76d7a792d3 libc.so.6!clone(+0x42)
[2020.02.05-06.48.37:669][ 0]LogExit: Executing StaticShutdownAfterError
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
fish: “./UE4Editor” terminated by signal SIGSEGV (Address boundary error)
#Utkarsha Khanal. Waiting simply fixed it for me, It took about 10-20mins on "verifying Global Shaders for SF_VULKAN_SM5" and then it booted up fine and compiled the shaders. Give that a try.
Same problem here. solved by changing folder permission. sync unreal want to not run as sudo, you have to make a change on folder permission first.
The below code is a sample.
cv::Mat mat = cv::Mat ( 500, 400, CV_32F, cv::Scalar::all ( 2.0 ) );
cv::Mat mat2;
cv::resize(mat, mat2, cv::Size(400,600), 0, 0, cv::INTER_LINEAR);
This give me this error
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in getMat_, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp, line 1319
terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp:1319: error: (-213) Unknown/unsupported array type in function getMat_
I have installed opencv 2.4.13 in /usr/locl as the default version and opencv 3.3.1 along with the ROS kinetic.
My cmake project A was built upon opencv 2.4.13 and it works properly. Now I need to transition to opencv 3.3.1 because another catkin package B depends on A and opencv 3.3.1. However, the problem occurs as above and I cannot fix it after day's googling.
Note that cv::resize works normally when tested using a single cpp file based project depending on either opencv 2.4.13 or 3.3.1.
It also works normally in project A depending upon opencv 2.4.13.
However, it causes running error in project A depending upon opencv 3.3.1
Any ideas are welcomed
I have also tried to compile both A and B using Opencv 2 and then I use find_package( OpenCV 2 REQUIRED) in my cmakelists.txt file. Another ruuning error caused by resize() was reported as below (may vary):
OpenCV Error: The function/feature is not implemented
Unknown/unsupported array type) in getMat_, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp, line 1319
terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp:1319:
error: (-213) Unknown/unsupported array type in function getMat_
or
OpenCV Error: The function/feature is not implemented (You should explicitly call mapHost/unmapHost methods for ogl::Buffer object) in getMat_,
file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp, line 1299
terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp:1299:
error: (-213) You should explicitly call mapHost/unmapHost methods for ogl::Buffer object in function getMat_
crazy( ⊙ o ⊙ )!
Finally, I re-implement those related functions where cv::resize is used in project A in my current project B, then it works.(⊙o⊙)
[Ubuntu14.04]
I'm trying to run darknet.
(https://pjreddie.com/darknet/yolov2/)
I have the error caused by that I'm using OpenCV 3.4.2 version.
(terminate called after throwing an instance of 'cv::Exception'
what():
OpenCV(3.4.2)/home/kasamatsu/opencv/modules/core/src/matrix_wrap.cpp:800:
error: (-215:Assertion failed) (flags & FIXED_TYPE) != 0 in function
'type')
I found I can solve the problem by changing the version of OpenCV used.
But I have no ideas about how to change it.
now my
/etc/ld.so.conf.d/opencv.conf
says /usr/local/lib
my /usr/local/libincludes
libopencv_highgui.so.3.2
libopencv_highgui.so.3.2.0
libopencv_highgui.so.3.4
libopencv_highgui.so.3.4.2
・・・and so on.
So I think my environment references only libopencv_highgui.so.3.4.2.
I would like to change this target.
I am a beginner of stack overflow and OpenCV.
Thank you in advance.
In my application I use opencv bindings for nodejs. Few days ago it starts crashing on some files with error:
OpenCV Error: Unknown error code -10 (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror file
/home/.../opencv/src/modules/highgui/src/grfmt_base.cpp, line 131
terminate called after throwing an instance of 'cv::Exception'
How to check that file contains DNL marker?
I have some problem running OpenCV programs with cvCalibrateCamera2.
This has been tried with examples from here
and Oreilly "Learning OpenCV" example ch11 ex11 (codes downloadable from here). The error is the same. The codes run through cvFindChessboardCorners, cvDrawChessboardCorners etc. with no problem, and they only fail at cvCalibrateCamera2 with the following information:
OpenCV Error: Assertion failed (_dst.fixedType()) in convertPointsHomogeneous, file /root/opencv-3.1.0/modules/calib3d/src/fundam.cpp, line 1034
terminate called after throwing an instance of 'cv::Exception'
what(): /root/opencv-3.1.0/modules/calib3d/src/fundam.cpp:1034: error: (-215) _dst.fixedType() in function convertPointsHomogeneous
Can you tell what the problem is, or point direction to where it could be?
After investigating into the OpenCV 3.1 source codes, I think the problem is with OpenCV itself, since the error comes from variables created and passed around within the library. I tried a lower version of OpenCV (2.4.13) and that fixed the problem.