Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ArghyaChatterjee/7bb3080e265c3013f5b61620560f9a09 to your computer and use it in GitHub Desktop.
Save ArghyaChatterjee/7bb3080e265c3013f5b61620560f9a09 to your computer and use it in GitHub Desktop.

Zed2 Depth Viewer Flashing and not working (cuda and qt5 error)

Error:

(wcf) wangchaofei@wangchaofei-Lenovo-Legion-R70002021:/usr/local/zed/tools$ ./ZED_Depth_Viewer
in bool ImageHandler::initialize(sl::Mat&) : Err [304]: OS call failed or operation not supported on this OS.
Stack trace (most recent call last):
#26 Object “[0xffffffffffffffff]”, at 0xffffffffffffffff, in
#25 Object “./ZED_Depth_Viewer”, at 0x5606d84063e4, in
#24 Object “/lib/x86_64-linux-gnu/libc.so.6”, at 0x7f72c6e29e3f, in __libc_start_main
#23 Object “/lib/x86_64-linux-gnu/libc.so.6”, at 0x7f72c6e29d8f, in
#22 Object “./ZED_Depth_Viewer”, at 0x5606d8405651, in
#21 Object “./ZED_Depth_Viewer”, at 0x5606d8430d4a, in
#20 Object “./ZED_Depth_Viewer”, at 0x5606d842bb4e, in
#19 Object “./ZED_Depth_Viewer”, at 0x5606d8441479, in
#18 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7f72c78b875a, in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag)
#17 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7f72c79130b7, in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag)
#16 Object “/lib/x86_64-linux-gnu/libglib-2.0.so.0”, at 0x7f72c71193e2, in g_main_context_iteration
#15 Object “/lib/x86_64-linux-gnu/libglib-2.0.so.0”, at 0x7f72c7171257, in
#14 Object “/lib/x86_64-linux-gnu/libglib-2.0.so.0”, at 0x7f72c711bd3a, in g_main_context_dispatch
#13 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7f72c7912ceb, in
#12 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7f72c79123ea, in QTimerInfoList::activateTimers()
#11 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7f72c78b9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#10 Object “/lib/x86_64-linux-gnu/libQt5Widgets.so.5”, at 0x7f72c856c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#9 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7f72c78e733e, in QObject::event(QEvent*)
#8 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7f72c78f57fd, in QTimer::timeout(QTimer::QPrivateSignal)
#7 Object “/lib/x86_64-linux-gnu/libQt5Core.so.5”, at 0x7f72c78f17c7, in
#6 Object “./ZED_Depth_Viewer”, at 0x5606d8431901, in
#5 Object “./ZED_Depth_Viewer”, at 0x5606d842cb94, in
#4 Object “./ZED_Depth_Viewer”, at 0x5606d843b103, in
#3 Object “./ZED_Depth_Viewer”, at 0x5606d8439c12, in
#2 Object “./ZED_Depth_Viewer”, at 0x5606d849b52d, in
#1 Object “./ZED_Depth_Viewer”, at 0x5606d845770d, in
#0 Object “/lib/x86_64-linux-gnu/libcuda.so.1”, at 0x7f72d1930b60, in
Segmentation fault (Signal sent by the kernel [(nil)])

Problem Description:

This is an OpenGL issue. When you update the NVIDIA driver on your Ubuntu machine or you install a new system from scratch, it can happen that the ZED tools cannot start or you cannot execute the ZED SDK samples due to problems with OpenGL.

This often happens on laptops and desktop computers with dual graphics adapters, and the operating system cannot automatically activate the NVIDIA driver when required.

One of the most common error messages in this case is

ERROR: Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

To verify that this is the problem affecting your machine you can open a terminal console and enter the command:

$ glxinfo | grep OpenGL

The correct output should contain the string (usually it is the first line of the output)

OpenGL vendor string: NVIDIA Corporation

if you get something different, for example

OpenGL vendor string: Intel

then your system is affected by the issue described above.

Solution:

The solution is to force the operating system to use the NVIDIA GPU using the "prime-select" command.

Open a terminal console and enter the command:

$ sudo prime-select query

If the output is different from "nvidia", then enter the command:

$ sudo prime-select nvidia

and reboot the system.

When the system restarts, open a terminal console and verify that the problem is resolved

$ glxinfo | grep OpenGL

and search the output for the string (usually, it is the first line)

OpenGL vendor string: NVIDIA Corporation

If the string is correct, you can try to launch the tool that was not starting or the sample that was crashing and verify that the problem is finally solved.

Source: https://community.stereolabs.com/t/when-i-run-zed-depth-viewer-it-keeps-flashing-back/3751/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment