Page 1 of 1

cfclient start fails with segmentation fault under Linux

Posted: Fri Oct 09, 2020 2:36 pm
by tintin
Hi,
suddenly, after updating to the most recent version, the startup of the cfclient fails with a segmentation fault:

ngl@cfcontrol:~$ python3 ~/Development/bitcraze/crazyflie-clients-python/bin/cfclient
INFO:cfclient.gui:Disabling STL printouts
INFO:cfclient.utils.input.inputreaders:Input readers: ['linuxjsdev', 'pysdl2']
INFO:cfclient.utils.input.inputreaders:Successfully initialized [linuxjsdev]
INFO:cfclient.utils.input.inputreaders:Could not initialize [pysdl2]: No SDL2 support on Linux
INFO:cfclient.utils.input.inputinterfaces:Found interfaces: ['leapmotion', 'wiimote', 'zmqpull']
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [leapmotion]: Leap Motion library probably not installed (No module named 'leapsdk')
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [wiimote]: Missing cwiid (wiimote) driver No module named 'cwiid'
INFO:cfclient.utils.config:Dist config read from /home/ngl/Development/bitcraze/crazyflie-clients-python/src/cfclient/configs/config.json
INFO:cfclient.utils.config:Config file read from [/home/ngl/.config/cfclient/config.json]
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [zmqpull]: ZMQ input disabled in config file
INFO:cfclient.utils.zmq_led_driver:ZMQ led disabled in config file
INFO:cfclient.utils.zmq_param:ZMQ param disabled in config file
INFO:cfclient.utils.input:Using device blacklist [(VirtualBox|VMware)]
INFO:cflib.crtp.radiodriver:v0.53 dongle with serial N/A found
Segmentation fault (core dumped)
ngl@cfcontrol:~$

I'm running on Linux Mint 20 and Python 3.8.5:
Linux cfcontrol 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Any ideas? Thanks and regards
Tintin

Re: cfclient start fails with segmentation fault under Linux

Posted: Sat Oct 10, 2020 2:25 pm
by tintin
The problem also occurs on another linux machine:


python3 ~/Development/bitcraze/crazyflie-clients-python/bin/cfclient
INFO:cfclient.gui:Disabling STL printouts
INFO:cfclient.utils.input.inputreaders:Input readers: ['linuxjsdev', 'pysdl2']
INFO:cfclient.utils.input.inputreaders:Successfully initialized [linuxjsdev]
INFO:cfclient.utils.input.inputreaders:Could not initialize [pysdl2]: No SDL2 support on Linux
INFO:cfclient.utils.input.inputinterfaces:Found interfaces: ['leapmotion', 'wiimote', 'zmqpull']
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [leapmotion]: Leap Motion library probably not installed (No module named 'leapsdk')
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [wiimote]: Missing cwiid (wiimote) driver No module named 'cwiid'
INFO:cfclient.utils.config:Dist config read from /home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/configs/config.json
INFO:cfclient.utils.config:Config file read from [/home/uwe/.config/cfclient/config.json]
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [zmqpull]: ZMQ input disabled in config file
INFO:cfclient.utils.zmq_led_driver:ZMQ led disabled in config file
INFO:cfclient.utils.zmq_param:ZMQ param disabled in config file
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no
INFO:cfclient.utils.input:Using device blacklist [(VirtualBox|VMware)]
INFO:cflib.crtp.radiodriver:v0.53 dongle with serial N/A found
WARNING: Although PyQt5 is already imported, the PyQt5 backend could not
be used ("cannot import name 'QtOpenGL' from 'PyQt5' (/usr/lib/python3/dist-packages/PyQt5/__init__.py)").
Note that running multiple GUI toolkits simultaneously can cause side effects.
WARNING:vispy:Although PyQt5 is already imported, the PyQt5 backend could not
be used ("cannot import name 'QtOpenGL' from 'PyQt5' (/usr/lib/python3/dist-packages/PyQt5/__init__.py)").
Note that running multiple GUI toolkits simultaneously can cause side effects.
===== 2020.10.10 16:10:42 =====
Traceback (most recent call last):
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/bin/cfclient", line 5, in <module>
main()
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/gui.py", line 189, in main
main_window = MainUI()
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/ui/main.py", line 266, in __init__
tab = tabClass(self.tabs, cfclient.ui.pluginhelper)
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/ui/tabs/locopositioning_tab.py", line 469, in __init__
self._set_up_plots()
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/ui/tabs/locopositioning_tab.py", line 500, in _set_up_plots
self._plot_3d.native.setSizePolicy(sizePolicy)
AttributeError: 'CanvasBackend' object has no attribute 'setSizePolicy'
libusb: warning [add_to_flying_list] failed to arm first timerfd (errno 9)
Segmentation fault (core dumped)

Re: cfclient start fails with segmentation fault under Linux

Posted: Mon Oct 12, 2020 11:28 am
by arnaud
There has been a new dependency added to the client recently, this is likely what is causing problem there.

Can you try to run "pip3 uninstall cfclient" and "pip3 install -e ." to reinstall the cfclient dependencies.

Re: cfclient start fails with segmentation fault under Linux

Posted: Mon Oct 12, 2020 6:01 pm
by tintin
Hi,

I followed your instructions but I still get the segmentation fault:


INFO:cfclient.gui:Disabling STL printouts
INFO:cfclient.utils.input.inputreaders:Input readers: ['linuxjsdev', 'pysdl2']
INFO:cfclient.utils.input.inputreaders:Successfully initialized [linuxjsdev]
INFO:cfclient.utils.input.inputreaders:Could not initialize [pysdl2]: No SDL2 support on Linux
INFO:cfclient.utils.input.inputinterfaces:Found interfaces: ['leapmotion', 'wiimote', 'zmqpull']
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [leapmotion]: Leap Motion library probably not installed (No module named 'leapsdk')
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [wiimote]: Missing cwiid (wiimote) driver No module named 'cwiid'
INFO:cfclient.utils.config:Dist config read from /home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/configs/config.json
INFO:cfclient.utils.config:Config file read from [/home/uwe/.config/cfclient/config.json]
INFO:cfclient.utils.input.inputinterfaces:Could not initialize [zmqpull]: ZMQ input disabled in config file
INFO:cfclient.utils.zmq_led_driver:ZMQ led disabled in config file
INFO:cfclient.utils.zmq_param:ZMQ param disabled in config file
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no
INFO:cfclient.utils.input:Using device blacklist [(VirtualBox|VMware)]
INFO:cflib.crtp.radiodriver:v0.53 dongle with serial N/A found
WARNING: Although PyQt5 is already imported, the PyQt5 backend could not
be used ("cannot import name 'QtOpenGL' from 'PyQt5' (/usr/lib/python3/dist-packages/PyQt5/__init__.py)").
Note that running multiple GUI toolkits simultaneously can cause side effects.
WARNING:vispy:Although PyQt5 is already imported, the PyQt5 backend could not
be used ("cannot import name 'QtOpenGL' from 'PyQt5' (/usr/lib/python3/dist-packages/PyQt5/__init__.py)").
Note that running multiple GUI toolkits simultaneously can cause side effects.
===== 2020.10.12 19:10:14 =====
Traceback (most recent call last):
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/bin/cfclient", line 5, in <module>
main()
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/gui.py", line 189, in main
main_window = MainUI()
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/ui/main.py", line 266, in __init__
tab = tabClass(self.tabs, cfclient.ui.pluginhelper)
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/ui/tabs/locopositioning_tab.py", line 469, in __init__
self._set_up_plots()
File "/home/uwe/Development/bitcraze/crazyflie-clients-python/src/cfclient/ui/tabs/locopositioning_tab.py", line 500, in _set_up_plots
self._plot_3d.native.setSizePolicy(sizePolicy)
AttributeError: 'CanvasBackend' object has no attribute 'setSizePolicy'
libusb: warning [add_to_flying_list] failed to arm first timerfd (errno 9)
Segmentation fault (core dumped)

Re: cfclient start fails with segmentation fault under Linux

Posted: Tue Oct 13, 2020 6:38 am
by tintin
Hi,
the cfclient on the official bitcraze VM is broken too after a pull, btw.
Regards
Tintin

Re: cfclient start fails with segmentation fault under Linux

Posted: Tue Oct 13, 2020 1:57 pm
by tintin
Hi,
in my desperation I also tried to install the cfclient via snap as per the published instructions. The installation worked but the client won't start. No error messages whatsoever.
Hope you come up with a fix soon, since I'm completely grounded.
Regards
Tintin

Re: cfclient start fails with segmentation fault under Linux

Posted: Wed Oct 14, 2020 11:08 am
by tintin
Hi,
I've just removed and then reinstalled the cfclient after today's bugfixes: now everything seems to work again and I didn't see any unexpected error messages in the terminal output.
Thanks for the quick support effort!

Regards
Tintin