./ZED_Depth_Viewer Segmentation fault (Address not mapped to objec

I got error below with ‘segment fault’ when i run ZED_Depth_Viewer tool in sdk’s tool folder

$ tools ./ZED_Depth_Viewer                     
[ZED Depth Viewer] CUDA - OpenGL Interop Failed with Err Code  999
Stack trace (most recent call last):
#20   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#19   Object "./ZED_Depth_Viewer", at 0x421ffd, in 
#18   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f454ce6d07c, in __libc_start_main
#17   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f454ce6cfcf, in 
#16   Object "./ZED_Depth_Viewer", at 0x421414, in 
#15   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f454d642023, in QCoreApplication::exec()
#14   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f454d639a9a, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#13   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f454d694547, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#12   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f454b9e5002, in g_main_context_iteration
#11   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f454ba3af07, in 
#10   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f454b9e78ba, in g_main_context_dispatch
#9    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f454d694ef6, in 
#8    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f454d63e256, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#7    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f454d63b169, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#6    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f454e1296b2, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#5    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f454d66873d, in QObject::event(QEvent*)
#4    Object "./ZED_Depth_Viewer", at 0x44a7f5, in 
#3    Object "./ZED_Depth_Viewer", at 0x4ac395, in 
#2    Object "./ZED_Depth_Viewer", at 0x46a8fd, in 
#1    Object "/lib/x86_64-linux-gnu/libcuda.so.1", at 0x7f455873d448, in 
#0    Object "/lib/x86_64-linux-gnu/libcuda.so.1", at 0x7f45586a4fa5, in 
Segmentation fault (Address not mapped to object [0x9])
[1]    20165 segmentation fault (core dumped)  ./ZED_Depth_Viewer

I’am wonder why this problem occur

======================================================================
below is my computer envrioment:

1. ubuntu version

$ tools lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 21.10
Release:	21.10
Codename:	impish

2. linux kernel version:

$ tools uname -r  
5.13.0-39-generic

3. cuda and driver version:

tools nvidia-smi
Wed Apr  6 12:42:03 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.29.05    Driver Version: 495.29.05    CUDA Version: 11.5     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0 Off |                  N/A |
| N/A   42C    P0    N/A /  N/A |      5MiB /  3910MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1770      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

4. zed sdk version:

ZED_SDK_Ubuntu20_cuda11.5_v3.7.1.run

Hi @haydenzhourepo
we have not tested the ZED SDK on Ubuntu 21.10, maybe OpenGL is in a different version with respect to Ubuntu 20.04 that is not compatible.

Another reason for this kind of error is the use of the machine by remote (i.e. ssh), is this your case?

@Myzhar Thanks for your replay . I am not use remote machine with ssh, and i found another problem when i test exemple “depth-sensing”

i found it will thorw segment fault when call cudaGraphicsMapResources function

void PointCloud::initialize(sl::Resolution res) {
  glGenBuffers(1, &bufferGLID_);
  glBindBuffer(GL_ARRAY_BUFFER, bufferGLID_);
  glBufferData(GL_ARRAY_BUFFER, res.area() * 4 * sizeof(float), 0, GL_DYNAMIC_DRAW);
  glBindBuffer(GL_ARRAY_BUFFER, 0);

  checkError(cudaGraphicsGLRegisterBuffer(&bufferCudaID_, bufferGLID_, cudaGraphicsRegisterFlagsNone));

  shader_ = Shader(POINTCLOUD_VERTEX_SHADER, POINTCLOUD_FRAGMENT_SHADER);
  shMVPMatrixLoc_ = glGetUniformLocation(shader_.getProgramId(), "u_mvpMatrix");

  matGPU_.alloc(res, sl::MAT_TYPE::F32_C4, sl::MEM::GPU);

  checkError(cudaGraphicsMapResources(1, &bufferCudaID_, 0));
  checkError(cudaGraphicsResourceGetMappedPointer((void**) &xyzrgbaMappedBuf_, &numBytes_, bufferCudaID_));
}

checkError(cudaGraphicsMapResources(1, &bufferCudaID_, 0));

this function always error, i wonder how can i fix this problem?

As I told you on the previous reply,

“we have not tested the ZED SDK on Ubuntu 21.10, maybe OpenGL is in a different version with respect to Ubuntu 20.04 that is not compatible.”

I was having the same issue when I was using a remote desktop. When I try to run it on the host computer it works fine.

@Flash In this case it can be a different problem.
What error message are you getting precisely?

I have the same issue, but I am on Ubuntu 20.04
[ZED Depth Viewer] CUDA - OpenGL Interop Failed with Err Code 999
Stack trace (most recent call last):
#21 Object “[0xffffffffffffffff]”, at 0xffffffffffffffff, in
#20 Object “/usr/local/zed/tools/ZED_Depth_Viewer”, at 0x421ffd, in
#19 Object “/lib/x86_64-linux-gnu/libc.so.6”, at 0x7fcbcc3b70b2, in __libc_start_main
#18 Object “/usr/local/zed/tools/ZED_Depth_Viewer”, at 0x421414, in
#17 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7fcbccb5e115, in QCoreApplication::exec()
#16 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7fcbccb563aa, in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag)
#15 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7fcbccbaf434, in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag)
#14 Object “/lib/x86_64-linux-gnu/libglib-2.0.so.0”, at 0x7fcbcb0624a2, in g_main_context_iteration
#13 Object “/lib/x86_64-linux-gnu/libglib-2.0.so.0”, at 0x7fcbcb0623ff, in
#12 Object “/lib/x86_64-linux-gnu/libglib-2.0.so.0”, at 0x7fcbcb06217c, in g_main_context_dispatch
#11 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7fcbccbafe36, in
#10 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7fcbccb5a487, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#9 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7fcbccb57809, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#8 Object “/lib/x86_64-linux-gnu/libQt5Widgets.so.5”, at 0x7fcbcd57b0ef, in QApplication::notify(QObject*, QEvent*)
#7 Object “/lib/x86_64-linux-gnu/libQt5Widgets.so.5”, at 0x7fcbcd571a65, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#6 Object “/lib/x86_64-linux-gnu/libQt5Widgets.so.5”, at 0x7fcbcd5b425c, in QWidget::event(QEvent*)
#5 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7fcbccb83c29, in QObject::event(QEvent*)
#4 Object “/usr/local/zed/tools/ZED_Depth_Viewer”, at 0x44a805, in
#3 Object “/usr/local/zed/tools/ZED_Depth_Viewer”, at 0x4ac3d5, in
#2 Object “/usr/local/zed/tools/ZED_Depth_Viewer”, at 0x46a93d, in
#1 Object “/lib/x86_64-linux-gnu/libcuda.so.1”, at 0x7fcbd7b6f958, in
#0 Object “/lib/x86_64-linux-gnu/libcuda.so.1”, at 0x7fcbd7acd5b5, in
Segmentation fault (Address not mapped to object [0x400000001])
Segmentation fault (core dumped)

  1. Ubuntu Version
    |Distributor ID:|Ubuntu|
    |—|—|
    |Description:|Ubuntu 20.04.4 LTS|
    |Release:|20.04|
    |Codename:|focal|

  2. Cuda and Driver Version:

  3. Zed SDK Version:
    ZED_SDK_Ubuntu20_cuda11.5_v3.7.2.run

Any idea?

Hi @Myzhar,
Here is the error message you asked for.

ZED_Depth_Viewer 
QGLShader::compile(Vertex): 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES

[ZED Depth Viewer] Failed to compile vertex shader GLSL 
QGLShader::compile(Fragment): 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES

[ZED Depth Viewer] Failed to compile fragment shader GLSL 
QGLShader::link: "error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader"
[ZED Depth Viewer] Failed to link shaders to program
QGLShader::link: "error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader"
[ZED Depth Viewer] Failed to bind shaders to program
QGLShaderProgram::uniformLocation( texture ): shader program is not linked
QGLShaderProgram::uniformLocation( matrix ): shader program is not linked
QGLShader::compile(Vertex): 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES

[ZED Depth Viewer] Failed to compile vertex shader GLSL 
QGLShader::compile(Fragment): 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES

[ZED Depth Viewer] Failed to compile fragment shader GLSL 
QGLShader::link: "error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader"
[ZED Depth Viewer] Failed to link shaders to program
QGLShader::link: "error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader"
[ZED Depth Viewer] Failed to bind shaders to program
QGLShaderProgram::uniformLocation( texture ): shader program is not linked
QGLShaderProgram::uniformLocation( matrix ): shader program is not linked
[ZED Depth Viewer] CUDA - OpenGL Interop Failed with Err Code  999
QGLShader::link: "error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader"
QGLShader::link: "error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader"
Stack trace (most recent call last):
#21   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#20   Object "ZED_Depth_Viewer", at 0x421ffd, in 
#19   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fd45d14e0b2, in __libc_start_main
#18   Object "ZED_Depth_Viewer", at 0x421414, in 
#17   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd45d8f7115, in QCoreApplication::exec()
#16   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd45d8ef3aa, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#15   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd45d948434, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#14   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7fd45bdfb4a2, in g_main_context_iteration
#13   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7fd45bdfb3ff, in 
#12   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7fd45bdfb17c, in g_main_context_dispatch
#11   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd45d948e36, in 
#10   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd45d8f3487, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#9    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd45d8f0809, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#8    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7fd45e3120ef, in QApplication::notify(QObject*, QEvent*)
#7    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7fd45e308a65, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#6    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7fd45e34b25c, in QWidget::event(QEvent*)
#5    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7fd45d91cc29, in QObject::event(QEvent*)
#4    Object "ZED_Depth_Viewer", at 0x44a805, in 
#3    Object "ZED_Depth_Viewer", at 0x4ac3d5, in 
#2    Object "ZED_Depth_Viewer", at 0x46a93d, in 
#1    Object "/lib/x86_64-linux-gnu/libcuda.so.1", at 0x7fd468908958, in 
#0    Object "/lib/x86_64-linux-gnu/libcuda.so.1", at 0x7fd4688665b5, in 
Segmentation fault (Address not mapped to object [0x400000001])
Segmentation fault (core dumped)

Can you try to put the prefix MESA_GL_VERSION_OVERRIDE=3.3 before calling the ZED_Depth_Viewer command?

i.e. $ MESA_GL_VERSION_OVERRIDE=3.3 ZED_Depth_Viewer

Thanks @Myzhar,
It didn’t fixed the problem, below is the error I got.

MESA_GL_VERSION_OVERRIDE=3.3 ZED_Depth_Viewer
[ZED Depth Viewer] CUDA - OpenGL Interop Failed with Err Code  999
Stack trace (most recent call last):
#21   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#20   Object "ZED_Depth_Viewer", at 0x421ffd, in 
#19   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f04e10c00b2, in __libc_start_main
#18   Object "ZED_Depth_Viewer", at 0x421414, in 
#17   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f04e1869115, in QCoreApplication::exec()
#16   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f04e18613aa, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#15   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f04e18ba434, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#14   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f04dfd6d4a2, in g_main_context_iteration
#13   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f04dfd6d3ff, in 
#12   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f04dfd6d17c, in g_main_context_dispatch
#11   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f04e18bae36, in 
#10   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f04e1865487, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#9    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f04e1862809, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#8    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f04e22840ef, in QApplication::notify(QObject*, QEvent*)
#7    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f04e227aa65, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#6    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f04e22bd25c, in QWidget::event(QEvent*)
#5    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f04e188ec29, in QObject::event(QEvent*)
#4    Object "ZED_Depth_Viewer", at 0x44a805, in 
#3    Object "ZED_Depth_Viewer", at 0x4ac3d5, in 
#2    Object "ZED_Depth_Viewer", at 0x46a93d, in 
#1    Object "/lib/x86_64-linux-gnu/libcuda.so.1", at 0x7f04ec87a958, in 
#0    Object "/lib/x86_64-linux-gnu/libcuda.so.1", at 0x7f04ec7d85b5, in 
Segmentation fault (Address not mapped to object [0x400000001])

I am having the exact same issue as flash. As is my coworker. Both using Ubuntu 20.04.4.

nvidia-smi
Wed Apr 20 09:09:57 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.47.03    Driver Version: 510.47.03    CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA T500         On   | 00000000:01:00.0 Off |                  N/A |
| N/A   31C    P0    N/A /  N/A |      9MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1463      G   /usr/lib/xorg/Xorg                  4MiB |
|    0   N/A  N/A      2502      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+
/usr/local/zed/tools$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

What is the output of the command $ prime-select query?
Can you try to force the OS to use the Nvidia GPU by setting $ sudo prime-select nvidia and rebooting?

The original output said on-demand. Switching to the nvidia resulted in the following

In order to switch to nvidia I had to clean up my boot partition but then the output of the primary-select query was nvidia and the depth viewer worked!

Hello! I also met this problem.
ubuntu20.04
cuda 11.6
cudnn 8.4
nvidia-smi 510
and I also couldnn’t open the depth camera

Hi @moyodancer,
I did change prime-select to Nvidia but didn’t clean up the boot partition. Can I know how to clean up the boot partition and what does it do?

sudo apt-get autoremove --purge will clean up unneeded kernals in your /boot partition. I only had to do this because sudo primary-select nvidia initially failed.

Hello! Did you solve this question, when I prime-select query, it said nvidia.
@moyodancer

For me prime-select query says Nvidia but it still fails.

MESA_GL_VERSION_OVERRIDE=3.3 ZED_Depth_Viewer
[ZED Depth Viewer] CUDA - OpenGL Interop Failed with Err Code  999
Stack trace (most recent call last):
#21   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#20   Object "ZED_Depth_Viewer", at 0x421ffd, in 
#19   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7ff4922610b2, in __libc_start_main
#18   Object "ZED_Depth_Viewer", at 0x421414, in 
#17   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff492a0a115, in QCoreApplication::exec()
#16   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff492a023aa, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#15   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff492a5b434, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#14   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7ff490f0e4a2, in g_main_context_iteration
#13   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7ff490f0e3ff, in 
#12   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7ff490f0e17c, in g_main_context_dispatch
#11   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff492a5be36, in 
#10   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff492a06487, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#9    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff492a03809, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#8    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff4934250ef, in QApplication::notify(QObject*, QEvent*)
#7    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff49341ba65, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#6    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7ff49345e25c, in QWidget::event(QEvent*)
#5    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7ff492a2fc29, in QObject::event(QEvent*)
#4    Object "ZED_Depth_Viewer", at 0x44a805, in 
#3    Object "ZED_Depth_Viewer", at 0x4ac3d5, in 
#2    Object "ZED_Depth_Viewer", at 0x46a93d, in 
#1    Object "/lib/x86_64-linux-gnu/libcuda.so.1", at 0x7ff49da1b958, in 
#0    Object "/lib/x86_64-linux-gnu/libcuda.so.1", at 0x7ff49d9795b5, in 
Segmentation fault (Address not mapped to object [0x400000001])
Segmentation fault (core dumped)

I know how to resolve it
primary-select nvidia and reboot

The problem with my new notebook after I apply primary-select nvidia, it just hangs after reboot