ros-visualization / python_qt_binding

http://wiki.ros.org/python_qt_binding
BSD 3-Clause "New" or "Revised" License
34 stars 54 forks source link

Segmentation fault when running rqt with PySide #81

Closed stertingen closed 4 years ago

stertingen commented 4 years ago

Central question: Has Shiboken2/PySide2 ever worked on Kinetic/Xenial?

Running rqt with PySide leads to:

$ rqt -b pyside
QtBindingHelper using pyside
PluginManager._discover() using cached plugin discovery information
Segmentation fault (core dumped)

Backtrace in gdb:

(gdb) r /opt/ros/kinetic/bin/rqt -b pyside
Starting program: /usr/bin/python /opt/ros/kinetic/bin/rqt -b pyside
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdee5a700 (LWP 3077)]
QtBindingHelper using pyside
PluginManager._discover() force discovery of plugins
RospkgPluginProvider._find_plugins() crawling for plugins of type 'qt_gui'

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fffd7a0e2c2 in QBasicAtomicInteger<int>::load() const ()
   from /home/hermann/rosws/devel_isolated/qt_gui_cpp/lib/python2.7/dist-packages/qt_gui_cpp/libqt_gui_cpp_shiboken.so
(gdb) bt
#0  0x00007fffd7a0e2c2 in QBasicAtomicInteger<int>::load() const ()
   from /home/hermann/rosws/devel_isolated/qt_gui_cpp/lib/python2.7/dist-packages/qt_gui_cpp/libqt_gui_cpp_shiboken.so
#1  0x00007fffd7a0d296 in QtPrivate::RefCount::ref() ()
   from /home/hermann/rosws/devel_isolated/qt_gui_cpp/lib/python2.7/dist-packages/qt_gui_cpp/libqt_gui_cpp_shiboken.so
#2  0x00007fffd7a0d413 in QString::QString(QString const&) ()
   from /home/hermann/rosws/devel_isolated/qt_gui_cpp/lib/python2.7/dist-packages/qt_gui_cpp/libqt_gui_cpp_shiboken.so
#3  0x00007fffd7792a29 in qt_gui_cpp::RosPluginlibPluginProvider<qt_gui_cpp::Plugin>::RosPluginlibPluginProvider(QString const&, QString const&) () from /home/hermann/rosws/devel_isolated/qt_gui_cpp/lib/libqt_gui_cpp.so
#4  0x00007fffd7a3794b in RosPluginlibPluginProvider_ForPluginsWrapper::RosPluginlibPluginProvider_ForPluginsWrapper(QString const&, QString const&) () from /home/hermann/rosws/devel_isolated/qt_gui_cpp/lib/python2.7/dist-packages/qt_gui_cpp/libqt_gui_cpp_shiboken.so
#5  0x00007fffd7a3a4e6 in Sbk_qt_gui_cpp_RosPluginlibPluginProvider_ForPlugins_Init ()
   from /home/hermann/rosws/devel_isolated/qt_gui_cpp/lib/python2.7/dist-packages/qt_gui_cpp/libqt_gui_cpp_shiboken.so
#6  0x00000000004ab58b in ?? ()
#7  0x00000000004c1c83 in PyEval_EvalFrameEx ()
#8  0x00000000004ba506 in PyEval_EvalCodeEx ()
#9  0x00000000004d5d09 in ?? ()
#10 0x00000000004ee30e in ?? ()
#11 0x00000000004edec6 in ?? ()
#12 0x00000000004ab58b in ?? ()
#13 0x00000000004c1c83 in PyEval_EvalFrameEx ()
#14 0x00000000004c1934 in PyEval_EvalFrameEx ()
#15 0x00000000004c1934 in PyEval_EvalFrameEx ()
#16 0x00000000004c1934 in PyEval_EvalFrameEx ()
#17 0x00000000004c1934 in PyEval_EvalFrameEx ()
#18 0x00000000004c1934 in PyEval_EvalFrameEx ()
#19 0x00000000004ba506 in PyEval_EvalCodeEx ()
#20 0x00000000004c1e32 in PyEval_EvalFrameEx ()
#21 0x00000000004ba506 in PyEval_EvalCodeEx ()
#22 0x00000000004c1e32 in PyEval_EvalFrameEx ()
#23 0x00000000004ba506 in PyEval_EvalCodeEx ()
#24 0x00000000004ea9ef in ?? ()
#25 0x00000000004e56a2 in PyRun_FileExFlags ()
#26 0x00000000004e3f56 in PyRun_SimpleFileExFlags ()
#27 0x0000000000493abe in Py_Main ()
#28 0x00007ffff7810830 in __libc_start_main (main=0x493560 <main>, argc=4, argv=0x7fffffffd0a8, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffd098) at ../csu/libc-start.c:291
#29 0x0000000000493489 in _start ()

Package versions: python-qt-binding: 0.2.17-1 ros-kinetic-python-qt-binding: 0.3.4-0xenial-20191214-042219+0000 ros-kinetic-qt-gui{,-core,-cpp}: 0.3.11-0xenial-20191214-062939+0000 ros-kinetic-rqt{,-gui,-gui-cpp}: 0.5.0-0xenial-20191214-070708+0000

Thoughts: Right now I'm trying to fix Shiboken2/PySide2 for versions > 2.0.0 targeting Arch Linux while not breaking Xenial/Kinetic and Melodic/Bionic. (See https://github.com/ros-visualization/python_qt_binding/pull/79, https://github.com/ros-visualization/qt_gui_core/pull/201)

Since Shiboken2/PySide2 seem to be broken on Xenial/Kinetic, wouldn't it be nicer to drop support for the semi-official release PySide 2.0.0-dev0 and move on to the official releases of PySide2 (>= 5.11), instead of keeping compatibility that may have never existed?

Status of Shiboken2/PySide2 in officially supported ROS versions: Kinetic/Xenial: CI builds (http://build.ros.org/job/Kpr__qt_gui_core__ubuntu_xenial_amd64/11/) Melodic/Bionic: CI skips (http://build.ros.org/job/Mpr__qt_gui_core__ubuntu_bionic_amd64/11/). I haven't tried offline build yet. Melodic/Stretch: not available on Debian Stretch

dirk-thomas commented 4 years ago

This looks like a duplicate of ros-visualization/qt_gui_core#66.