Nuitrack problem after PCL installation


Recently I got a Nuitrack Pro licence through my University to working with an Intel RealSense D435. Testing, activation and running the examples in Ubuntu 18.04 worked fine until the PCL installation.

First, at the installation of PCL I got the following error:

  Preparing to unpack .../openni-utils_1.5.4.0-14build1_amd64.deb ...
  Unpacking openni-utils ( ...
  dpkg: error processing archive /var/cache/apt/archives/openni-utils_1.5.4.0-14build1_amd64.deb (--unpack):
   trying to overwrite '/usr/bin/NiViewer', which is also in package nuitrack 0.27.0

As I don’t need OpenNI in my project, I didn’t force the installation of such package. But, when I include the following lines into the CMAkeList.txt:

find_package(PCL REQUIRED)

target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES} ${realsense2_LIBRARY} nuitrack ${OpenCV_LIBS} ${PCL_LIBRARIES})

and in the code I make some calling to PCL like:

pcl::PointCloudpcl::PointXYZ::Ptr cloud(new pcl::PointCloudpcl::PointXYZ);

the skeleton tracking fails and the console only shows this message:

UVCVideoCapture::open ERROR: can’t find device
The program has unexpectedly finished.

In previous posts here I read that although RS D435 cann’t use OpenNI, Nuitrack requires it to its workflow. To me, the problem looks like a libraries conflict where PCL are interfering with Nuitrack…

Could you help me with some feedback about the correct installation to work with PCL and Nuitrack together?

Thank you in advance.

PD: Of course, when I remove the PCL callings all comes to work again.

Hi Raul,

Please check the solution given in this thread: Segfault in SkeletonTracker::create() when using PCL visualization

Hello Olga,

Thank you for the quick response. I included the shared pointer with make_shared<TiXmlDocument> but the error doesn’t disappear or change at all.

I passed over that post because was related to Nuitrack v0.25 and I’m using the last one.

Please run the sample using gdb and send us the stack.

Thank you. Here is the complete output:

$ gdb --ex=r ./ClimbingA
GNU gdb (Ubuntu 8.1-0ubuntu3)
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./ClimbingA...done.
Starting program: /home/raub/code/SmartClimbingTrainer/build/ClimbingA 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
[New Thread 0x7fffd8ee6700 (LWP 3311)]
[New Thread 0x7fffcee26700 (LWP 3312)]
[New Thread 0x7fffce625700 (LWP 3313)]
[New Thread 0x7fffccd98700 (LWP 3314)]
[New Thread 0x7fffbffff700 (LWP 3316)]
[New Thread 0x7fffbf7fe700 (LWP 3317)]
[Thread 0x7fffbf7fe700 (LWP 3317) exited]
[New Thread 0x7fffbf7fe700 (LWP 3319)]
[New Thread 0x7fffbeffd700 (LWP 3320)]
[New Thread 0x7fffbe7fc700 (LWP 3321)]
[New Thread 0x7fffbdffb700 (LWP 3322)]
[Thread 0x7fffbdffb700 (LWP 3322) exited]
[Thread 0x7fffbffff700 (LWP 3316) exited]
[Thread 0x7fffbe7fc700 (LWP 3321) exited]
[Thread 0x7fffbf7fe700 (LWP 3319) exited]
[New Thread 0x7fffbf7fe700 (LWP 3323)]
[New Thread 0x7fffbe7fc700 (LWP 3324)]
[New Thread 0x7fffbffff700 (LWP 3325)]
[New Thread 0x7fffbdffb700 (LWP 3326)]
[New Thread 0x7fffa7fff700 (LWP 3330)]
[New Thread 0x7fffa6fca700 (LWP 3331)]
[New Thread 0x7fffa67c9700 (LWP 3332)]
[New Thread 0x7fffa5dbb700 (LWP 3333)]
[New Thread 0x7fffa55ba700 (LWP 3334)]
[Thread 0x7fffa55ba700 (LWP 3334) exited]
[Thread 0x7fffa7fff700 (LWP 3330) exited]
[Thread 0x7fffa67c9700 (LWP 3332) exited]
UVCVideoCapture::open ERROR: can't find device
[New Thread 0x7fffa67c9700 (LWP 3336)]
[New Thread 0x7fffa7fff700 (LWP 3337)]
[New Thread 0x7fffa55ba700 (LWP 3338)]
[New Thread 0x7fff856d8700 (LWP 3339)]
[New Thread 0x7fff84ed7700 (LWP 3340)]
[New Thread 0x7fff846d6700 (LWP 3341)]
[New Thread 0x7fff83ed5700 (LWP 3342)]
[New Thread 0x7fff8352d700 (LWP 3343)]
[New Thread 0x7fff82d2c700 (LWP 3344)]
[New Thread 0x7fff8252b700 (LWP 3345)]
Create DepthProvider: Realsense2DepthProvider
[New Thread 0x7fff8161d700 (LWP 3346)]
[New Thread 0x7fff80e1c700 (LWP 3347)]
[New Thread 0x7fff8061b700 (LWP 3348)]
[New Thread 0x7fff7fe1a700 (LWP 3349)]
[New Thread 0x7fff7f619700 (LWP 3350)]
free(): invalid pointer

Thread 1 "ClimbingA" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

There is not enough information for me. Should I set some extra parameters when running GDB or maybe in the Nuitrack configuration file?

Please use the command backtrace (or bt) after you get the output.


This is the trace, thanks.

Thread 1 "ClimbingA" received signal SIGSEGV, Segmentation fault.
0x00007fff8ef9e71d in ?? ()
   from /usr/etc/nuitrack/middleware/
(gdb) tr
Tracepoint 1 at 0x7fff8ef9e71d
(gdb) bt
#0  0x00007fff8ef9e71d in  ()
    at /usr/etc/nuitrack/middleware/
#1  0x00007fff8eae40f6 in  ()
    at /usr/etc/nuitrack/middleware/
#2  0x00007fff8eadf4e2 in  ()
    at /usr/etc/nuitrack/middleware/
#3  0x00007fff8eae29d0 in  ()
    at /usr/etc/nuitrack/middleware/
#4  0x00007fff8eadf4e2 in  ()
    at /usr/etc/nuitrack/middleware/
#5  0x00007fff8eb03d87 in  ()
    at /usr/etc/nuitrack/middleware/
#6  0x00007fff8eaeccfd in  ()
    at /usr/etc/nuitrack/middleware/
#7  0x00007ffff677e5b6 in std::shared_ptr<tdv::nuitrack::middleware::Skeletonization> tdv::nuitrack::middleware::Core::createModule<tdv::nuitrack::middleware::Skeletonization>() () at /usr/local/lib/nuitrack/
#8  0x00007ffff677ec45 in std::shared_ptr<tdv::nuitrack::middleware::Skeletonization> tdv::nuitrack::middleware::Core::getModule<tdv::nuitrack::middleware::Skeletonization>(unsigned long) () at /usr/local/lib/nuitrack/
#9  0x00007ffff677bfb1 in  () at /usr/local/lib/nuitrack/
#10 0x00007ffff6783f2d in nuitrack_CreateSkeletonTracker ()
    at /usr/local/lib/nuitrack/
---Type <return> to continue, or q <return> to quit---
#11 0x000055555566675b in tdv::nuitrack::SkeletonTracker::create() ()
    at /home/raub/code/NuitrackSDK/Nuitrack/include/nuitrack/modules/SkeletonTracker.h:83
#12 0x0000555555667f51 in NuitrackPlay::initSensor() (this=0x555555dc0400)
    at /home/raub/code/SmartClimbingTrainer/src/nuitrack.cpp:79
#13 0x000055555563feef in Sensor::initialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, PlayMode, int3, PrepParams) (this=0x555555dc0400, file_name="/home/raub/code/SmartClimbingTrainer/build/640x480a30.bag", playMode=MOD_PLAYBACK, resolution=..., prepParams=...)
    at /home/raub/code/SmartClimbingTrainer/include/sensor.hpp:78
#14 0x000055555563de75 in GLViewWindow::on_play_Button_pressed() (this=0x7fffffffe000) at /home/raub/code/SmartClimbingTrainer/src/glviewwindow.cpp:107
#15 0x0000555555683fbf in GLViewWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x7fffffffe000, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fffffffd330)
    at /home/raub/code/SmartClimbingTrainer/build/ClimbingA_autogen/6YEA5652QU/moc_glviewwindow.cpp:129
#16 0x00005555556840f0 in GLViewWindow::qt_metacall(QMetaObject::Call, int, void**) (this=0x7fffffffe000, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fffffffd330)
    at /home/raub/code/SmartClimbingTrainer/build/ClimbingA_autogen/6YEA5652QU/moc_glviewwindow.cpp:165
#17 0x00007ffff30e9729 in QMetaObject::activate(QObject*, int, int, void**) ()
---Type <return> to continue, or q <return> to quit---
    at /usr/lib/x86_64-linux-gnu/
#18 0x00007ffff3f29e7d in  () at /usr/lib/x86_64-linux-gnu/
#19 0x00007ffff3f2a57c in QAbstractButton::mousePressEvent(QMouseEvent*) ()
    at /usr/lib/x86_64-linux-gnu/
#20 0x00007ffff3e7799f in QWidget::event(QEvent*) ()
    at /usr/lib/x86_64-linux-gnu/
#21 0x00007ffff3e3883c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/
#22 0x00007ffff3e4065f in QApplication::notify(QObject*, QEvent*) ()
    at /usr/lib/x86_64-linux-gnu/
#23 0x00007ffff30ba9e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/
#24 0x00007ffff3e3f632 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
    at /usr/lib/x86_64-linux-gnu/
#25 0x00007ffff3e9216b in  () at /usr/lib/x86_64-linux-gnu/
#26 0x00007ffff3e947da in  () at /usr/lib/x86_64-linux-gnu/
#27 0x00007ffff3e3883c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/
#28 0x00007ffff3e40104 in QApplication::notify(QObject*, QEvent*) ()
    at /usr/lib/x86_64-linux-gnu/
#29 0x00007ffff30ba9e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/
---Type <return> to continue, or q <return> to quit---
#30 0x00007ffff367c583 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/x86_64-linux-gnu/
#31 0x00007ffff367e055 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
    at /usr/lib/x86_64-linux-gnu/
#32 0x00007ffff36552eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/
#33 0x00007fffdcda01c0 in  () at /usr/lib/x86_64-linux-gnu/
#34 0x00007fffed136387 in g_main_context_dispatch ()
    at /usr/lib/x86_64-linux-gnu/
#35 0x00007fffed1365c0 in  () at /usr/lib/x86_64-linux-gnu/
#36 0x00007fffed13664c in g_main_context_iteration ()
    at /usr/lib/x86_64-linux-gnu/
#37 0x00007ffff311399f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/
#38 0x00007ffff30b8a1a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/
#39 0x00007ffff30c1ac4 in QCoreApplication::exec() ()
    at /usr/lib/x86_64-linux-gnu/
#40 0x000055555563d366 in main(int, char**) (argc=1, argv=0x7fffffffe168)
    at /home/raub/code/SmartClimbingTrainer/src/main.cpp:26

What are your versions of tinyxml and pcl?

Hello Olga,

I’m using libtinyxml2.6.2v5_2.6.2-4 with PCL 1.8.1+dfsg1-2ubuntu2.18.04.1, but in the installation of the latter I got the OpenNI problem.

We’ll investigate the problem and get back to you as soon as we find the solution.

Hello Olga,

Have you had any progress on this issue? I installed the latest version of Nuitrack and updated my RealSense libraries, but I’m still stuck if I try to integrate it with PCL …

Thanks for your attention.

We were able to reproduce this issue. We’ll add the fix for this issue in the next Nuitrack release.