Moin
I'm getting segmentation fault in opencv whenever I try to call kinect2_bridge
My setup is:
Ubuntu: 14.04 64
ROS: indigo
OpenCV: 2.4.8 (binary opencv comes with ROS)
Libfreenect: compiled with c++11- All of these are working:
./Protonect gl and
./Protonect cl to and
./Protonect cpu)
This is otput of gdb of kinect2_bridge
Starting program: /home/behnam/iai_kinect2_ws/devel/lib/kinect2_bridge/kinect2_bridge
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe1ae5700 (LWP 12554)]
[New Thread 0x7fffe12e4700 (LWP 12555)]
[New Thread 0x7fffe0ae3700 (LWP 12556)]
[New Thread 0x7fffdbfff700 (LWP 12561)]
[New Thread 0x7fffdb014700 (LWP 12562)]
[New Thread 0x7fffda813700 (LWP 12563)]
[ INFO] [Kinect2Bridge::initialize] parameter:
base_name: kinect2
sensor: default
fps_limit: -1
calib_path: /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/data/
use_png: false
jpeg_quality: 90
png_level: 1
depth_method: opencl
depth_device: -1
reg_method: opencl
reg_device: -1
max_depth: 12
min_depth: 0.1
queue_size: 2
bilateral_filter: true
edge_aware_filter: true
publish_tf: false
base_name_tf: kinect2
worker_threads: 4
Beignet: self-test failed: (3, 7, 5) + (5, 7, 3) returned (3, 7, 5)
This can usually be fixed by upgrading Linux to >= 4.2,
see /usr/share/doc/beignet-opencl-icd/Beignet.mdwn.gz or http://www.freedesktop.org/wiki/Software/Beignet/
Beignet: Warning - overriding self-test failure
Beignet: Warning - overriding self-test failure
[Info] [OpenCLDepthPacketProcessorImpl] devices:
[Info] [OpenCLDepthPacketProcessorImpl] 0: Intel(R) HD Graphics Haswell GT2 Mobile (GPU)[Intel]
[Info] [OpenCLDepthPacketProcessorImpl] selected device: Intel(R) HD Graphics Haswell GT2 Mobile (GPU)[Intel]
[Info] [OpenCLDepthPacketProcessorImpl] building OpenCL program...
[Info] [OpenCLDepthPacketProcessorImpl] OpenCL program built successfully
[Warning] [OpenCLDepthPacketProcessorImpl] Your ocl-icd has deadlock bugs. Update to 2.2.4+ is recommended.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
[Info] [VaapiRgbPacketProcessorImpl] driver: Intel i965 driver for Intel(R) Haswell Mobile - 1.7.0
[New Thread 0x7fffd8c37700 (LWP 12583)]
[New Thread 0x7fffcbfff700 (LWP 12584)]
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 17 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @4:3 with serial 003851462247
[Info] [Freenect2Impl] found 1 devices
[ INFO] [Kinect2Bridge::initDevice] Kinect2 devices found:
[ INFO] [Kinect2Bridge::initDevice] 0: 003851462247 (selected)
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 2016384 ir: 608*33792
[Info] [Freenect2DeviceImpl] opened
[ INFO] [Kinect2Bridge::initDevice] starting kinect2
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[ INFO] [Kinect2Bridge::initDevice] device serial: 003851462247
[ INFO] [Kinect2Bridge::initDevice] device firmware: 4.0.3911.0
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff714b642 in cv::Mat::copyTo(cv::_OutputArray const&) const () from /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4
(gdb) bt
0 0x00007ffff714b642 in cv::Mat::copyTo(cv::_OutputArray const&) const () from /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4
1 0x000000000044abbf in cv::Mat::clone (this=0x7fffffffc9d8) at /opt/ros/indigo/include/opencv-3.1.0-dev/opencv2/core/mat.inl.hpp:643
2 0x00000000004547d5 in Kinect2Bridge::initDevice (this=0x7fffffffc820, sensor="003851462247") at /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:603
3 0x000000000044f7fb in Kinect2Bridge::initialize (this=0x7fffffffc820) at /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:305
4 0x000000000044d3c1 in Kinect2Bridge::start (this=0x7fffffffc820) at /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:152
5 0x0000000000448926 in main (argc=1, argv=0x7fffffffd7a8) at /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:1603
Moin I'm getting segmentation fault in opencv whenever I try to call kinect2_bridge My setup is: Ubuntu: 14.04 64 ROS: indigo OpenCV: 2.4.8 (binary opencv comes with ROS) Libfreenect: compiled with c++11- All of these are working: ./Protonect gl and
./Protonect cl to and ./Protonect cpu)
This is otput of gdb of kinect2_bridge Starting program: /home/behnam/iai_kinect2_ws/devel/lib/kinect2_bridge/kinect2_bridge [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffe1ae5700 (LWP 12554)] [New Thread 0x7fffe12e4700 (LWP 12555)] [New Thread 0x7fffe0ae3700 (LWP 12556)] [New Thread 0x7fffdbfff700 (LWP 12561)] [New Thread 0x7fffdb014700 (LWP 12562)] [New Thread 0x7fffda813700 (LWP 12563)] [ INFO] [Kinect2Bridge::initialize] parameter: base_name: kinect2 sensor: default fps_limit: -1 calib_path: /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/data/ use_png: false jpeg_quality: 90 png_level: 1 depth_method: opencl depth_device: -1 reg_method: opencl reg_device: -1 max_depth: 12 min_depth: 0.1 queue_size: 2 bilateral_filter: true edge_aware_filter: true publish_tf: false base_name_tf: kinect2 worker_threads: 4 Beignet: self-test failed: (3, 7, 5) + (5, 7, 3) returned (3, 7, 5) This can usually be fixed by upgrading Linux to >= 4.2, see /usr/share/doc/beignet-opencl-icd/Beignet.mdwn.gz or http://www.freedesktop.org/wiki/Software/Beignet/ Beignet: Warning - overriding self-test failure Beignet: Warning - overriding self-test failure [Info] [OpenCLDepthPacketProcessorImpl] devices: [Info] [OpenCLDepthPacketProcessorImpl] 0: Intel(R) HD Graphics Haswell GT2 Mobile (GPU)[Intel] [Info] [OpenCLDepthPacketProcessorImpl] selected device: Intel(R) HD Graphics Haswell GT2 Mobile (GPU)[Intel] [Info] [OpenCLDepthPacketProcessorImpl] building OpenCL program... [Info] [OpenCLDepthPacketProcessorImpl] OpenCL program built successfully [Warning] [OpenCLDepthPacketProcessorImpl] Your ocl-icd has deadlock bugs. Update to 2.2.4+ is recommended. libva info: VA-API version 0.39.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_39 libva info: va_openDriver() returns 0 [Info] [VaapiRgbPacketProcessorImpl] driver: Intel i965 driver for Intel(R) Haswell Mobile - 1.7.0 [New Thread 0x7fffd8c37700 (LWP 12583)] [New Thread 0x7fffcbfff700 (LWP 12584)] [Info] [Freenect2Impl] enumerating devices... [Info] [Freenect2Impl] 17 usb devices connected [Info] [Freenect2Impl] found valid Kinect v2 @4:3 with serial 003851462247 [Info] [Freenect2Impl] found 1 devices [ INFO] [Kinect2Bridge::initDevice] Kinect2 devices found: [ INFO] [Kinect2Bridge::initDevice] 0: 003851462247 (selected) [Info] [Freenect2DeviceImpl] opening... [Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 2016384 ir: 608*33792 [Info] [Freenect2DeviceImpl] opened [ INFO] [Kinect2Bridge::initDevice] starting kinect2 [Info] [Freenect2DeviceImpl] starting... [Info] [Freenect2DeviceImpl] submitting rgb transfers... [Info] [Freenect2DeviceImpl] submitting depth transfers... [Info] [Freenect2DeviceImpl] started [ INFO] [Kinect2Bridge::initDevice] device serial: 003851462247 [ INFO] [Kinect2Bridge::initDevice] device firmware: 4.0.3911.0 [Info] [Freenect2DeviceImpl] stopping... [Info] [Freenect2DeviceImpl] canceling rgb transfers... [Info] [Freenect2DeviceImpl] canceling depth transfers... [Info] [Freenect2DeviceImpl] stopped
Program received signal SIGSEGV, Segmentation fault. 0x00007ffff714b642 in cv::Mat::copyTo(cv::_OutputArray const&) const () from /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4 (gdb) bt
0 0x00007ffff714b642 in cv::Mat::copyTo(cv::_OutputArray const&) const () from /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4
1 0x000000000044abbf in cv::Mat::clone (this=0x7fffffffc9d8) at /opt/ros/indigo/include/opencv-3.1.0-dev/opencv2/core/mat.inl.hpp:643
2 0x00000000004547d5 in Kinect2Bridge::initDevice (this=0x7fffffffc820, sensor="003851462247") at /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:603
3 0x000000000044f7fb in Kinect2Bridge::initialize (this=0x7fffffffc820) at /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:305
4 0x000000000044d3c1 in Kinect2Bridge::start (this=0x7fffffffc820) at /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:152
5 0x0000000000448926 in main (argc=1, argv=0x7fffffffd7a8) at /home/behnam/iai_kinect2_ws/src/iai_kinect2/kinect2_bridge/src/kinect2_bridge.cpp:1603