Cannot open the driver after some time

Dear team,

We have been working on GenIcam and CVB for quite some time. Previously, the driver for Genicam was being loaded alright and the images were being saved just fine. We were using Acquisition Stack to load the driver. Since yesterday, the code line for Discover:

auto infoList = Cvb::DeviceFactory::Discover(Cvb::DiscoverFlags::IgnoreVins);

has started returning Segmentation fault. The GeniCam browser was kept closed while running this code.

image

When we try using the OpenPort function, a C-API call failed, LoadImageFile error is returned.

image

Opening and streaming images through the camera through GeniCam browser is working fine.

I will be grateful if you could let me if you know the solution or if there is a workaround for it.

Kind regards,
Maggi

Hi @maggi

You can check our LogGUI if you get a more detailed error output.
The output of the LogGUI can get very big if several modules are activated with a level like info, debug or trace.

You can start by activating the modules GevTL, GEVSD with the Level “err” or “warn”

You can read more about the LogGUI here:
Common Vision Blox Logging GUI

Dear @Sebastian ,

Thank you very much for your response. I have tried LogGUI, with all the modules available, and following were the outputs.

  1. Opening the driver through Acquisition Stack didn’t return any error message on the LogGUI, though it had received the segmentation fault in the Terminal. Expanding the log criteria to ‘Debug’ shows 1 warning:

  1. Opening the driver through OpenPort at Log visibility level of ‘Warn’, shows one error and 3 warnings. This opening feature has not been tested still, prior to it we were mainly successfully operating the camera through the Acquisition Stack.

Could you point towards any resource for it, any guidance will be highly appreciated.

Have a nice day,

Kind regards,
Maggi

It looks like you are missing the path to the transport layer in the environment variable GENICAM_GENTL64_PATH
This could be caused by a broken cvb setup or another setup which also changes this variable.

Normally it should include the path “/opt/cvb/drivers/genicam”.
Please check with env if it contains the path and add if if it does not.

Hi @Sebastian

I have checked the environment variable ‘GENICAM_GENTL64_PATH’ in the system and it is correctly pointing to the ‘/opt/cvb/drivers/genicam’.

image

Recently, the same problem also started reflecting in the GeniCam browser (Edit: This is resolved as mentioned in the Edit message below):

The problem seems to be in the transport layer for the code and GeniCam browser, as mentioned at one post on the forum here (https://help.commonvisionblox.com/NextGen/14.0/md_theory_of_operation_hardware__gen_i_cam__c_v_b__user_guide.html#gcug_chmtopic74).

I have tried to reinstall Common Vision Blox after properly uninstalling it (with system reboots), the problem still persists. Could you point towards any resource for it, any guidance will be highly appreciated.

Have a nice day,

Kind regards,
Maggi

Currently, I do not know what else can go wrong. Maybe my colleagues have additional ideas.
In the meantime, it is important to verify that you use a supported Linux distribution. Can you give me:

  • Ubuntu version
  • CVB Version
  • System platform

@Sebastian .

Edit: The browser issue is resolved. For a discussion or to give suggestion on the original code error, kindly follow the next message

Sure, thank you, I can await the other inputs. In the meanwhile,

CVB installation version: cvb-13.04.005-ubu2004-x86_64
Ubuntu version: Ubuntu 20.04.4 LTS
Machine hardware architecture: x86_64
Intel(R) Core™ i7-9700TE CPU @ 1.80GHz

As it was working previously, I think it may be compatible. There may be some Transport layer configuration changes/settings that might be giving an issue.

Edit: The structure of Transport layer driver directory is given below:

Edit: The GeniCam browser issue is resolved. Apparently it was an error in setting the environment variable. While solving the previous code error, I mistakenly changed the variable to ‘opt/cvb/drivers/genicam’ instead of ‘/opt/cvb/drivers/genicam’. Right now I am trying to resolve the original Transport driver loading error, the logging of which results in the following:

@Sebastian kindly do you happen to have an idea about this.

Hi @maggi
Now we need to go back to the start as it looks like you are facing a different issue here. These errors warnings and errors are probably normal.
As I now know you are using a USB Kamera, what is the output of the command:
lsual

Hi @Sebastian ,

The camera is actually GigE. Not sure, why it is calling to the USBTL. The result for lsual command is:

image

The error shown on the command line for opening the camera through code is “Unspecified GenTL error” (the “Segmentation fault” has gone away):

The logging window shows majorly the previous errors, except for a new warning at the line 4 (Caught Exception in CVFIFGetDeviceInfo : TL Error: -1007, Invalid DeviceInfoId 1113)

The device is now visible on GeniCam browser and openable through the “Available Devices” window on the left. The configuration of the camera have also been saved to the “Configured Devices” window on the right and saved to the GenIcam.vin file through the button given above on the application icon bar.

{
The device is not openable through the “Configured Devices” (In the logging window below, it mentions: Cannot open device. Error finding interface for the device. The logging of camera opening and closing through “Available Devices” can also be seen above this logging line):

Edit: The device is now openable through Configured Devices, (this portion of text mentioned in curly brackets), not sure why, though the aforementioned Code based “Unspecified GenTL error” is still there:

}

The Configuration Settings for this device are:

The GeniCam.vin file details are shown here (kindly note it mentions modified date of 18 March, accessed date unrelated to opening through the code or browser, as it didn’t update when I just tried it)

P.s: Not sure if it is related, PC seems to have remnants of previous CVB version 13.04.004 though I properly uninstalled it through the uninstall_cvb.sh command and rebooted the PC, the clock on this PC also happens to be one hour ahead normal time.

Kindly feel free to let me know if you know a prospective direction in which this could be explored or if there is a setting that I may be missing to make the Configured GeniCam.vin file available. I will be looking forward to hearing from you.

Kind regards,
Maggi

It still seems that you have a broken cvb setup. Now in the log I see this warning:
Caught Exception in CVFGCGetNodeMap: CVGENICAM_REGISTRY environment not set.

The CVGENICAM_REGISTRY environment variable should be set to /var/opt/cvb/Registry

Do you have a fresh system where you can install CVB?

@Sebastian maybe the setup is the issue, as I see in the system the CVGENICAM_REGISTRY is pointing to ‘/var/opt/cvb/Registry’.

image

We don’t have another system at hand where this could be installed as we are working on one project setup machine. Do you have some guidelines, how I can possibly clean uninstall CVB completely and then install it again?

Kind regards,
maggi

Hi @maggi,

could you please provide us your environment variables?
Also, I remember there was a problem with the OpenPort() where arguments for the port > 0 did not work.
I will check this back, maybe @c.hartmann or @Andreas have more information on this.

As soon as we double checked your environment we can discuss the next steps.

If we dont find an issue there, it would be good to uninstall cvb, reboot the machine and then use the ‘find’ command to find all possible still existing files containing ‘cvb’ or ‘genicam’

Probably we should also manually check all paths in the environment if they were actually deleted and if the directories they once pointed to are really gone.

Cheers
Chris

Dear @Chris

Thank you very much for your reply, please find attached the environment variables as outputted through the printenv command. There is no other user set on the PC.

SHELL=/bin/bash
SESSION_MANAGER=local/usercam-pc:@/tmp/.ICE-unix/1835,unix/usercam-pc:/tmp/.ICE-unix/1835
QT_ACCESSIBILITY=1
COLORTERM=truecolor
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
XDG_MENU_PREFIX=gnome-
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
CONDA_EXE=/home/usercampc/anaconda3/bin/conda
_CE_M=
GENICAM_CACHE_V3_3=/home/usercampc/.config/Pleora/genicam_cache_v3_3
GENICAM_CACHE_V3_1=/var/opt/cvb/genicam
LC_ADDRESS=de_BE.UTF-8
GNOME_SHELL_SESSION_MODE=ubuntu
LC_NAME=de_BE.UTF-8
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
XMODIFIERS=@im=ibus
DESKTOP_SESSION=ubuntu
LC_MONETARY=de_BE.UTF-8
SSH_AGENT_PID=1800
GENICAM_GENTL64_PATH=/opt/cvb/drivers/genicam
GTK_MODULES=gail:atk-bridge
PWD=/home/usercampc
GENICAM_CACHE=/home/usercampc/.config/Pleora/genicam_cache_v3_3
XDG_SESSION_DESKTOP=ubuntu
LOGNAME=usercampc
XDG_SESSION_TYPE=x11
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
XAUTHORITY=/run/user/1000/gdm/Xauthority
CVBCONFIG=/etc/opt/cvb
PUREGEV_ROOT=/opt/jai/ebus_sdk/Ubuntu-20.04-x86_64
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
WINDOWPATH=2
HOME=/home/usercampc
USERNAME=usercampc
IM_CONFIG_PHASE=1
LC_PAPER=de_BE.UTF-8
LANG=en_US.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
XDG_CURRENT_DESKTOP=ubuntu:GNOME
GENICAM_ROOT=/opt/jai/ebus_sdk/Ubuntu-20.04-x86_64/lib/genicam
VTE_VERSION=6003
GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/bbeedd0f_47a4_4903_98ca_3b729ce76cb3
https_proxy=http://localhost:3128
CVB=/opt/cvb
INVOCATION_ID=86950b90156e4469985feeafaf4bfaab
MANAGERPID=1619
GENICAM_LOG_CONFIG=/opt/jai/ebus_sdk/Ubuntu-20.04-x86_64/lib/genicam/log/config/DefaultLogging.properties
GJS_DEBUG_OUTPUT=stderr
LESSCLOSE=/usr/bin/lesspipe %s %s
XDG_SESSION_CLASS=user
CVGENICAM_REGISTRY=/var/opt/cvb/Registry
GENICAM_LOG_CONFIG_V3_3=/opt/jai/ebus_sdk/Ubuntu-20.04-x86_64/lib/genicam/log/config/DefaultLogging.properties
PYTHONPATH=/opt/jai/ebus_sdk/Ubuntu-20.04-x86_64/lib:
TERM=xterm-256color
LC_IDENTIFICATION=de_BE.UTF-8
_CE_CONDA=
CVBDATA=/var/opt/cvb
LESSOPEN=| /usr/bin/lesspipe %s
USER=usercampc
GNOME_TERMINAL_SERVICE=:1.124
CONDA_SHLVL=0
DISPLAY=:1
SHLVL=1
LC_TELEPHONE=de_BE.UTF-8
HTTPS_PROXY=http://localhost:3128
HTTP_PROXY=http://localhost:3128
GENICAM_ROOT_V3_3=/opt/jai/ebus_sdk/Ubuntu-20.04-x86_64/lib/genicam
QT_IM_MODULE=ibus
LC_MEASUREMENT=de_BE.UTF-8
http_proxy=http://localhost:3128
CONDA_PYTHON_EXE=/home/usercampc/anaconda3/bin/python
LD_LIBRARY_PATH=/opt/jai/ebus_sdk/Ubuntu-20.04-x86_64/lib/genicam/bin/Linux64_x64:/opt/jai/ebus_sdk/Ubuntu-20.04-x86_64/lib
XDG_RUNTIME_DIR=/run/user/1000
LC_TIME=de_BE.UTF-8
JOURNAL_STREAM=8:49159
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
PATH=/home/usercampc/anaconda3/bin:/home/usercampc/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
GDMSESSION=ubuntu
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
LC_NUMERIC=de_BE.UTF-8
_=/usr/bin/printenv

When I previously received the GENICAM_GENTL64_PATH error in the 5th message from top, I had also added that variable to the ‘/etc/environment.txt’ file which since then looks like this:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
export http_proxy=http://localhost:3128
export https_proxy=http://localhost:3128
export HTTP_PROXY=http://localhost:3128
export HTTPS_PROXY=http://localhost:3128
GENICAM_GENTL64_PATH=/opt/cvb/drivers/genicam

Kindly feel free to let me know if you observe any anomalies in it. Wish you a good day ahead,

Kind regards,
Maggi

Hi @maggi ,

I am still double checking but following are the entries of the env I have from another system:

These are:

CVB=/opt/cvb
GENICAM_GENTL64_PATH=/opt/cvb/drivers/genicam
CVGENICAM_REGISTRY=/var/opt/cvb/Registry
GENICAM_CACHE_V3_1=/var/opt/cvb/genicam
CVBDATA=/var/opt/cvb
CVBCONFIG=/etc/opt/cvb

Maybe we should try and uninstall CVB from your system and check if all the path are gone and the folders/files are cleared after a restart.

Edit: All the paths in your environment seem to be set correctly.

Cheers
Chris