Openni_tracker crashes with a segmentation fault (core dumped). [closed]
Any idea on what is causing it ? It is running on Ubuntu 12.04 LTS, ROS Fuerte and an intel graphics card.
gbd run output :
(gdb) run
Starting program: /opt/ros/fuerte/stacks/openni_tracker/bin/openni_tracker
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff1038700 (LWP 8120)]
[New Thread 0x7ffff0837700 (LWP 8121)]
[New Thread 0x7fffebfff700 (LWP 8122)]
[New Thread 0x7fffeb7fe700 (LWP 8127)]
[New Thread 0x7fffdf623700 (LWP 8133)]
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe8a56e56 in Segmentation::detectionByPoint(bool, std::vector<Vector2D<int>, std::allocator<Vector2D<int> > > const*) ()
from /usr/lib/libXnVFeatures_1_5_2.so
BT output :
#0 0x00007fffe8a56e56 in Segmentation::detectionByPoint(bool, std::vector<Vector2D<int>, std::allocator<Vector2D<int> > > const*) ()
from /usr/lib/libXnVFeatures_1_5_2.so
#1 0x00007fffe8a61b61 in Segmentation::update(Array2D<unsigned short> const&, MotionDetectorByEdges const&, Floor const&, Farfield&, std::vector<Vector2D<int>, std::allocator<Vector2D<int> > > const*) ()
from /usr/lib/libXnVFeatures_1_5_2.so
#2 0x00007fffe8a4769b in SceneAnalyzer::Update(std::vector<Vector2D<int>, std::allocator<Vector2D<int> > > const*, unsigned int) ()
from /usr/lib/libXnVFeatures_1_5_2.so
#3 0x00007fffe8a0f95e in XnVSceneAnalyzer::InitFromSM() ()
from /usr/lib/libXnVFeatures_1_5_2.so
#4 0x00007fffe8a107cb in XnVSceneAnalyzer::UpdateData() ()
from /usr/lib/libXnVFeatures_1_5_2.so
#5 0x00007ffff6d315b7 in ?? () from /usr/lib/libOpenNI.so.0
#6 0x00007ffff6d3173e in ?? () from /usr/lib/libOpenNI.so.0
#7 0x00007ffff6d316b3 in ?? () from /usr/lib/libOpenNI.so.0
#8 0x00007ffff6d31965 in ?? () from /usr/lib/libOpenNI.so.0
#9 0x00007ffff6d31c0a in xnWaitAndUpdateAll () from /usr/lib/libOpenNI.so.0
#10 0x000000000040346b in WaitAndUpdateAll (this=<optimized out>)
at /usr/include/ni/XnCppWrapper.h:9347
#11 main (argc=1, argv=<optimized out>)
at /tmp/buildd/ros-fuerte-openni-tracker-0.1.3/debian/ros-fuerte-openni-tracker/opt/ros/fuerte/stacks/openni_tracker/src/openni_tracker.cpp:190
It also usually happens after I run it once succesfully. The first time it always runs OK, after that it may work once more, but the next will always segfault. After a reboot the same procedure occurs.
Can you post the backtrace?
Edited for BT and some details
I have the same problem than you, more details about when you get this error in my post : http://answers.ros.org/question/62873/openninite-segmentation-fault-with-openni_tracker/ but I didn't get any answer...
Since the first time it runs well, maybe the process XnSensorServer does not close properly. After closing the program, try to kill the XnSensorServer.
Thank you for your suggestion, I haven't been able to test it yet due to a power outage though. As soon as I can I will and post the results !
That actually seems to work ! I have been testing it for about an hour so far and it seems to do the job ! Thanks a bunch rastaxe ! BTW how do I mark this as solved and your answer as the solution ?
I am happy this works for you. I will put my comment directly in the answer section and you can set it as correct.