strands-project / v4r_ros_wrappers

ROS wrappers for the V4R library
9 stars 15 forks source link

segmentation fault in RTMT #40

Open ghanimmukhtar opened 7 years ago

ghanimmukhtar commented 7 years ago

Hi all, I am working with ROS Indigo and a RGB-D kinect v1. So I installed both v4r and the wrappers from the Debian packages as shown in the instructions. Then when I tried to follow the tutorial here and when I try to model the object I get a segmentation fault in RTMT when I press "Camera Start" button.

When I run the command with valgrind I get this output:

==22759== Memcheck, a memory error detector
==22759== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==22759== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==22759== Command: /opt/ros/indigo/bin/RTMT
==22759== 
==22767== Warning: invalid file descriptor 1024 in syscall close()
==22767== Warning: invalid file descriptor 1025 in syscall close()
==22767== Warning: invalid file descriptor 1026 in syscall close()
==22767== Warning: invalid file descriptor 1027 in syscall close()
==22767==    Use --log-fd=<number> to select an alternative log fd.
==22767== Warning: invalid file descriptor 1028 in syscall close()
==22767== Warning: invalid file descriptor 1029 in syscall close()
==22759== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s)
==22759==    at 0x62F69BD: ??? (syscall-template.S:81)
==22759==    by 0x33D31666: ??? (in /usr/lib/nvidia-375/libGLX_nvidia.so.375.26)
==22759==    by 0x33D2DAC8: ??? (in /usr/lib/nvidia-375/libGLX_nvidia.so.375.26)
==22759==    by 0x33CC5BBD: ??? (in /usr/lib/nvidia-375/libGLX_nvidia.so.375.26)
==22759==    by 0x351E1355: ??? (in /usr/lib/nvidia-375/libnvidia-glcore.so.375.26)
==22759==    by 0x351D9AD3: ??? (in /usr/lib/nvidia-375/libnvidia-glcore.so.375.26)
==22759==    by 0x351DB732: ??? (in /usr/lib/nvidia-375/libnvidia-glcore.so.375.26)
==22759==    by 0x351DBF33: ??? (in /usr/lib/nvidia-375/libnvidia-glcore.so.375.26)
==22759==    by 0x33D1A8C9: ??? (in /usr/lib/nvidia-375/libGLX_nvidia.so.375.26)
==22759==    by 0x351D8383: ??? (in /usr/lib/nvidia-375/libnvidia-glcore.so.375.26)
==22759==    by 0x351D8D08: ??? (in /usr/lib/nvidia-375/libnvidia-glcore.so.375.26)
==22759==    by 0x33CC5E65: ??? (in /usr/lib/nvidia-375/libGLX_nvidia.so.375.26)
==22759==  Address 0xffefff63c is on thread 1's stack
==22759== 
==22759== Thread 3 Sensor:
==22759== Invalid write of size 8
==22759==    at 0x69044E4: pcl::OpenNIGrabber::OpenNIGrabber(std::string const&, pcl::OpenNIGrabber::Mode const&, pcl::OpenNIGrabber::Mode const&) (openni_grabber.cpp:96)
==22759==    by 0x44CC15: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)
==22759==  Address 0x31505fe8 is 0 bytes after a block of size 1,080 alloc'd
==22759==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22759==    by 0x44CBE4: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)
==22759== 
==22759== Invalid write of size 8
==22759==    at 0x6904500: pcl::OpenNIGrabber::OpenNIGrabber(std::string const&, pcl::OpenNIGrabber::Mode const&, pcl::OpenNIGrabber::Mode const&) (openni_grabber.cpp:96)
==22759==    by 0x44CC15: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)
==22759==  Address 0x31505ff0 is 8 bytes after a block of size 1,080 alloc'd
==22759==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22759==    by 0x44CBE4: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)
==22759== 
==22759== Invalid write of size 8
==22759==    at 0x6904513: pcl::OpenNIGrabber::OpenNIGrabber(std::string const&, pcl::OpenNIGrabber::Mode const&, pcl::OpenNIGrabber::Mode const&) (openni_grabber.cpp:96)
==22759==    by 0x44CC15: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)
==22759==  Address 0x31505ff8 is 16 bytes after a block of size 1,080 alloc'd
==22759==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22759==    by 0x44CBE4: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)
==22759== 
==22759== Invalid write of size 8
==22759==    at 0x6904526: pcl::OpenNIGrabber::OpenNIGrabber(std::string const&, pcl::OpenNIGrabber::Mode const&, pcl::OpenNIGrabber::Mode const&) (openni_grabber.cpp:96)
==22759==    by 0x44CC15: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)
==22759==  Address 0x31506000 is 16 bytes after a block of size 1,088 in arena "client"
==22759== 
==22759== Invalid write of size 8
==22759==    at 0x6904539: pcl::OpenNIGrabber::OpenNIGrabber(std::string const&, pcl::OpenNIGrabber::Mode const&, pcl::OpenNIGrabber::Mode const&) (openni_grabber.cpp:96)
==22759==    by 0x44CC15: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)
==22759==  Address 0x31506008 is 24 bytes after a block of size 1,088 in arena "client"
==22759== 

valgrind: m_mallocfree.c:304 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed.
valgrind: Heap block lo/hi size mismatch: lo = 1152, hi = 9221120237041090560.
This is probably caused by your program erroneously writing past the
end of a heap block and corrupting heap metadata.  If you fix any
invalid writes reported by Memcheck, this assertion failure will
probably go away.  Please try that before reporting this as a bug.

host stacktrace:
==22759==    at 0x3805DB16: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==22759==    by 0x3805DC24: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==22759==    by 0x3805DDA6: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==22759==    by 0x3806AB83: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==22759==    by 0x380571EB: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==22759==    by 0x38055CCB: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==22759==    by 0x38059B3B: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==22759==    by 0x380552C7: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==22759==    by 0x81A580749: ???
==22759==    by 0x819C81EDF: ???
==22759==    by 0x39C479FF: ???
==22759==    by 0x3802CE7F: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==22759==    by 0x6904354: _Deque_base (stl_deque.h:453)
==22759==    by 0x6904354: deque (stl_deque.h:783)
==22759==    by 0x6904354: Synchronizer (synchronizer.h:65)
==22759==    by 0x6904354: pcl::OpenNIGrabber::OpenNIGrabber(std::string const&, pcl::OpenNIGrabber::Mode const&, pcl::OpenNIGrabber::Mode const&) (openni_grabber.cpp:96)
==22759==    by 0x39C4B1FF: ???
==22759==    by 0x1B3467: ???
==22759==    by 0x81B7C7FFF: ???

sched status:
  running_tid=3

Thread 1: status = VgTs_WaitSys
==22759==    at 0xC676310: writev (writev.c:54)
==22759==    by 0x1D387DFD: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==22759==    by 0x1D388190: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==22759==    by 0x1D388210: xcb_writev (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==22759==    by 0x1100BF05: _XSend (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==22759==    by 0x1100C3E7: _XReply (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==22759==    by 0x110080CC: XSync (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==22759==    by 0xAF7AB14: QRasterWindowSurface::syncX() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==22759==    by 0xAF7ADF4: QRasterWindowSurface::beginPaint(QRegion const&) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==22759==    by 0xAF94638: QWidgetBackingStore::sync() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==22759==    by 0xADC6E9F: QWidgetPrivate::syncBackingStore() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==22759==    by 0xADD6E79: QWidget::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==22759==    by 0xB191A32: QMainWindow::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==22759==    by 0xAD87E2B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==22759==    by 0xAD8E49F: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==22759==    by 0xB9EE4DC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xB9F1B3C: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xBA1BF82: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x1533AE03: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==22759==    by 0x1533B047: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==22759==    by 0x1533B0EB: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==22759==    by 0xBA1B7A0: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xAE29BE5: QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==22759==    by 0xB9ED0AE: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xB9ED3A4: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xB9F2B78: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x410375: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xC5A6F44: (below main) (libc-start.c:287)

Thread 2: status = VgTs_WaitSys
==22759==    at 0xC671FDD: ??? (syscall-template.S:81)
==22759==    by 0x1533AFE3: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==22759==    by 0x1533B0EB: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==22759==    by 0xBA1B7BD: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xB9ED0AE: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xB9ED3A4: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xB8E9C5E: QThread::exec() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xB9CE822: QInotifyFileSystemWatcherEngine::run() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)

Thread 3: status = VgTs_Runnable
==22759==    at 0x690454C: pcl::OpenNIGrabber::OpenNIGrabber(std::string const&, pcl::OpenNIGrabber::Mode const&, pcl::OpenNIGrabber::Mode const&) (openni_grabber.cpp:96)
==22759==    by 0x44CC15: ??? (in /opt/ros/indigo/bin/RTMT)
==22759==    by 0xB8EC32E: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==22759==    by 0x62EF183: start_thread (pthread_create.c:312)
==22759==    by 0xC67F37C: clone (clone.S:111)

Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.

Any ideas as of why this is happening? Cheers!

gxxzs commented 5 years ago

did you solve this? I get the same problem

ToMadoRe commented 5 years ago

just wanted to let you know that this repository is deprecated. You can find the latest public release on https://rgit.acin.tuwien.ac.at/v4r/v4r_ros_wrappers. Unfortunately though I do not know if that solves your problem.