Segmentation Fault in Ubuntu 20.04

I have asked this question in github but haven’t had any luck getting a response. I am trying to run the latest version and get a segmentation fault whether I run nuitrack, nuitrack_sample or nuitrack_device_api_sample . I have a Real Sense D435 and am running it using USB 3. It shows up fine when using the realsense-viewer. Below is a backtrace from /usr/bin/QtNuitrackLicense. Can anyone help me get this working. It’s been a while since I have been trying with no success. Thanks.

(gdb) bt
#0  _IO_fgets (buf=buf@entry=0x7fffd53b8250 "", n=n@entry=255, fp=fp@entry=0x0)
    at iofgets.c:47
#1  0x00007fff6107b16b in fgets (__stream=0x0, __n=255, __s=0x7fffd53b8250 "")
    at /usr/include/x86_64-linux-gnu/bits/stdio2.h:263
#2  list_video_devices(bool, bool) (rescan=false, silent=true)
    at /home/voxel/5voxel/code/0529/3DCameraAPI/3DCameraAPI/plat/linux/../../../3DCameraAPI/src/3DCameraAPI/v4l2_wrapper.cpp:1544
#3  0x00007fff6107c29d in get_device_id_from_pid_vid(char const*, char const*)
    (pid=pid@entry=0x7fff6213a705 <productList+5> "182d", vid=vid@entry=0x7fff6213a700 <productList> "0b05")
    at /home/voxel/5voxel/code/0529/3DCameraAPI/3DCameraAPI/plat/linux/../../../3DCameraAPI/src/3DCameraAPI/v4l2_wrapper.cpp:1590
#4  0x00007fff610684f4 in deviceSensorAPI::scanVideoCamera(CameraDevInfo*)
    (this=0x7fffc80bd390, cameraDevInfo=0x7fffc80a6d20)
    at /home/voxel/5voxel/code/0529/3DCameraAPI/3DCameraAPI/plat/linux/../../../3DCameraAPI/src/3DCameraAPI/3DCameraAPI.cpp:2445
#5  0x00007fff61059ea6 in SenDuckDriver::initialize(void (*)(OniDeviceInfo const*, void*), void (*)(OniDeviceInfo const*, void*), void (*)(OniDeviceInfo const*, int, void*), void*) ()
    at /usr/local/lib/nuitrack/OpenNI2/Drivers/libSenDuck.so
#6  0x00007fffe9380f30 in oni::implementation::DeviceDriver::initialize() ()
    at /usr/local/lib/nuitrack/libOpenNI2.so
#7  0x00007fffe9378f17 in oni::implementation::Context::loadLibraries() ()
--Type <RET> for more, q to quit, c to continue without paging--
   sr/local/lib/nuitrack/libOpenNI2.so
#8  0x00007fffe937add6 in oni::implementation::Context::initialize() () at /usr/local/lib/nuitrack/libOpenNI2.so
#9  0x00007fffda1025c1 in  () at /usr/etc/nuitrack/middleware/libNuitrackModule.so
#10 0x00007fffda0eb6fc in  () at /usr/etc/nuitrack/middleware/libNuitrackModule.so
#11 0x00007ffff5e4a21d in tdv::nuitrack::middleware::Core::getDeviceList() () at /usr/local/lib/nuitrack/libmiddleware.so
#12 0x00007ffff7a953c6 in tdv::nuitrack::Nuitrack::getDeviceList() () at /usr/local/lib/nuitrack/libnuitrack.so
#13 0x00007ffff7ab80c2 in nuitrack_GetDeviceList () at /usr/local/lib/nuitrack/libnuitrack.so
#14 0x000000000040ffbc in tdv::nuitrack::Nuitrack::getDeviceList() ()
#15 0x000000000040dc77 in QtConcurrent::StoredFunctorCall0<std::vector<std::shared_ptr<tdv::nuitrack::device::NuitrackDevice>, std::allocator<std::shared_ptr<tdv::nuitrack::device::NuitrackDevice> > >, std::vector<std::shared_ptr<tdv::nuitrack::device::NuitrackDevice>, std::allocator<std::shared_ptr<tdv::nuitrack::device::NuitrackDevice> > > (*)()>::runFunctor() ()
#16 0x000000000041165b in QtConcurrent::RunFunctionTask<std::vector<std::shared_ptr<tdv::nuitrack::device::NuitrackDevice>, std::allocator<std::shared_ptr<tdv::nuitrack::device::NuitrackDevice> > > >::run() ()
#17 0x00007ffff688ff82 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff688c9d2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff63c3609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#20 0x00007ffff64ff293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Hi @cinetron!

Sorry for the issues you’ve encountered!
What architecture do you use (arm/x64)?
Could you please run nuitrack_sample in cmd and send us the output (without gdb).

Looking forward to your response.

Hi Mariya,
Thanks for your reply. There really isn’t much output. This is it below:

Segmentation fault (core dumped)

Is there something else I can do to help you debug this.
Thanks!

Hi @cinetron

Please provide us with the following information:

  • Check if nuitrack_home is set correctly (run echo $NUITRACK_HOME)
  • Run ldd /usr/bin/nuitrack_sample in cmd and send us the output
  • Does the realsense-viewer inactive when you run nuitrack?
  • Do you use usb 3.0 cable with your sensor?
  • Have you already tried running this command? sudo chmod -R 777 /dev/bus/usb/

Thanks Mariya. Please see below.

Check if nuitrack_home is set correctly (run echo $NUITRACK_HOME)

It is at /usr/etc/nuitrack

Run ldd /usr/bin/nuitrack_sample in cmd and send us the output

Output is :

(base) jim@jim-Lenovo-Y720:~$ ldd /usr/bin/nuitrack_sample
linux-vdso.so.1 (0x00007ffd9597b000)
libnuitrack.so => /usr/local/lib/nuitrack/libnuitrack.so (0x00007fc2204bb000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc220474000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc220451000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fc2203c9000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc2203ad000)
libmiddleware.so => /usr/local/lib/nuitrack/libmiddleware.so (0x00007fc21fdd2000)
libopencv_imgproc.so.3.4 => /usr/local/lib/nuitrack/libopencv_imgproc.so.3.4 (0x00007fc21f803000)
libopencv_core.so.3.4 => /usr/local/lib/nuitrack/libopencv_core.so.3.4 (0x00007fc21f30d000)
libglut.so.3 => /usr/lib/x86_64-linux-gnu/libglut.so.3 (0x00007fc21f0c4000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc21eee2000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc21ed93000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc21ed76000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc21eb84000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc21eb7e000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc220aab000)
libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fc21eac6000)
libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fc21ea92000)
libzip.so => /usr/local/lib/nuitrack/libzip.so (0x00007fc21e80e000)
libtbb.so.2 => /usr/local/lib/nuitrack/libtbb.so.2 (0x00007fc21e5a4000)
libbluetooth.so.3 => /usr/lib/x86_64-linux-gnu/libbluetooth.so.3 (0x00007fc21e57f000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fc21e442000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fc21e430000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fc21e429000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fc21e3fd000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fc21e3e8000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fc21e3e2000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fc21e3da000)
libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fc21e3c0000)

Does the realsense-viewer inactive when you run nuitrack?
Yes.

Do you use usb 3.0 cable with your sensor?

Yes

Have you already tried running this command? sudo chmod -R 777 /dev/bus/usb/

I just did and I still get the segmentation fault.

Unfortunately, we cannot tell what is causing the problem at the moment. We ran nuitrack latest version on ubuntu 20.04/x64 using RealSense D435 and didn’t get this problem.
Officially, Nuitrack does not support Ubuntu 20.04.
You could try running nuitrack on ubuntu 18.04 or try switching realsense to another sensor, if possible.
We’ll begin testing Ubuntu 20.04 in the near future and notify our customers as soon as we add support for this platform.
We are really sorry for the inconvenience.

Could you please tell us: are you using nuitrack in a container cause nuitrack doesn’t work in it.

Thanks again Mariya. I’m surprised your company hasn’t started supporting Ubuntu 20.04 yet as it’s over a year since it’s release and is an LTS release. No I’m not running nuitrack in a container. I’ll continue trying to figure out whats going on and let you know if I do.

One thing I have noticed is the shell script to run nuitrack includes QT_QPA_FONTDIR=$NUITRACK_HOME/qt/lib/fonts/
This fonts directory is missing from the package nuitrack-ubuntu-amd64.deb . It does exist in the ARM package so I took it from there and installed it at $NUITRACK_HOME/qt/lib/fonts/ . I am still getting the same segmentation fault but perhaps this is an issue?

Hi @cinetron!
At the moment we can’t tell if this is the issue with QT.
We are planning to add support for Ubuntu 20.04 by the end of November.

Hi @cinetron!
We sent you an email, please contact us.