Date: Sat, 18 Apr 2020 11:18:48 +0200 From: =?UTF-8?Q?BERTRAND_Jo=c3=abl?= <joel.bertrand@systella.fr> To: freebsd-hackers@freebsd.org Subject: Segfault on some applications using qt5 Message-ID: <fc23aeb1-7dc4-e5df-3fb7-77a39f1094a6@systella.fr>
next in thread | raw e-mail | index | archive | help
Hello, I'm not sure you remember I have posted here a long time ago that some applications abort with segfault on a diskless workstation. Yesterday, as I have successfully build seamonkey 2.53.2b1 from sources, I have upgraded this workstation from 12.0 to 12.1. I have upgraded ports also. Same constatation, a lot of applications abort with segfault. For example : vlc or okular. I have rebuilt both applications from sources to have debug information and I have seen that both segfault occur in libQt5Gui.so.5 Full backtrace : (gdb) bt #0 0x0000000803051ed0 in ?? () from /usr/local/lib/qt5/libQt5Gui.so.5 #1 0x00000008032b7723 in ?? () from /usr/local/lib/qt5/libQt5Gui.so.5 #2 0x00000008032b92f9 in QRasterPaintEngine::fillRect(QRectF const&, QSpanData*) () from /usr/local/lib/qt5/libQt5Gui.so.5 #3 0x00000008032de2db in QPainter::fillRect(QRect const&, QBrush const&) () from /usr/local/lib/qt5/libQt5Gui.so.5 #4 0x0000000802ac4bbe in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5 #5 0x0000000802ac47a8 in QWidgetPrivate::paintBackground(QPainter*, QRegion const&, int) const () from /usr/local/lib/qt5/libQt5Widgets.so.5 #6 0x0000000802acbcc8 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/local/lib/qt5/libQt5Widgets.so.5 #7 0x0000000802aa4a45 in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5 #8 0x0000000802aa344c in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5 #9 0x0000000802af4cf4 in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5 #10 0x0000000802af1e0a in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5 #11 0x0000000802a97ca3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5 #12 0x0000000802a991ec in QApplication::notify(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Widgets.so.5 #13 0x0000000803a39362 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5 #14 0x0000000803083bcc in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from /usr/local/lib/qt5/libQt5Gui.so.5 #15 0x0000000803065afc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/lib/qt5/libQt5Gui.so.5 #16 0x000000080657f8bf in ?? () from /usr/local/lib/qt5/libQt5XcbQpa.so.5 #17 0x00000008041e87d7 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.0 #18 0x00000008041e8b9a in ?? () from /usr/local/lib/libglib-2.0.so.0 #19 0x00000008041e8c54 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.0 #20 0x0000000803a91e06 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/lib/qt5/libQt5Core.so.5 #21 0x0000000803a34a0e in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/lib/qt5/libQt5Core.so.5 #22 0x0000000803a39ace in QCoreApplication::exec() () from /usr/local/lib/qt5/libQt5Core.so.5 #23 0x00000008024b50c4 in ?? () from /usr/local/lib/vlc/plugins/gui/libqt_plugin.so #24 0x00000008024b46d6 in ?? () from /usr/local/lib/vlc/plugins/gui/libqt_plugin.so #25 0x000000080027b736 in ?? () from /lib/libthr.so.3 /usr/local/lib/qt5/libQt5Gui.so.5 is built with clang and linked against libc++.so.1. Okular and vlc are built with gcc. Thus, I have tried to rebuild okular and gcc with clang. I have added in /etc/make.conf: .if ${.CURDIR:M*/multimedia/vlc} CC=clang CXX=clang++ CPP=clang-cpp .endif .if ${.CURDIR:M*/graphics/okular} CC=clang CXX=clang++ CPP=clang-cpp .endif and I have verified that both applications are now built with clang. Same result: segfault in libQt5Gui.so.5 To obtain more informations, I have tried to rebuild /x11-toolkits/qt5-gui from sources, but without success . Compilation aborts with : In file included from image/qimage_ssse3.cpp:40: In file included from ../../include/QtGui/qimage.h:1: In file included from ../../include/QtGui/../../src/gui/image/qimage.h:48: In file included from ../../include/QtGui/qtransform.h:1: In file included from ../../include/QtGui/../../src/gui/painting/qtransform.h:43: In file included from ../../include/QtGui/qmatrix.h:1: In file included from ../../include/QtGui/../../src/gui/painting/qmatrix.h:45: In file included from ../../include/QtGui/qregion.h:1: In file included from ../../include/QtGui/../../src/gui/painting/qregion.h:49: In file included from ../../include/QtCore/qdatastream.h:1: In file included from ../../include/QtCore/../../src/corelib/serialization/qdatastream.h:44: In file included from ../../include/QtCore/qiodevice.h:1: In file included from ../../include/QtCore/../../src/corelib/io/qiodevice.h:45: In file included from ../../include/QtCore/qobject.h:1: In file included from ../../include/QtCore/../../src/corelib/kernel/qobject.h:54: In file included from ../../include/QtCore/qmetatype.h:1: ../../include/QtCore/../../src/corelib/kernel/qmetatype.h:97:5: error: division by zero in preprocessor expression #if QT_CONFIG(easingcurve) ^~~~~~~~~~~~~~~~~~~~~~ ../../include/QtCore/../../src/corelib/global/qglobal.h:86:30: note: expanded from macro 'QT_CONFIG' #define QT_CONFIG(feature) (1/QT_FEATURE_##feature == 1) ~^~~~~~~~~~~~~~~~~~~~~ 3 errors generated. *** Error code 1 Stop. make[1]: stopped in /usr/ports/x11-toolkits/qt5-gui/work/qtbase-everywhere-src-5.14.2/src/gui *** Error code 1 Stop. make: stopped in /usr/ports/x11-toolkits/qt5-gui And I don't know what I can do to build this library... Best regards, JKB
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fc23aeb1-7dc4-e5df-3fb7-77a39f1094a6>