Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.12.3
-
None
Description
We just upgraded from 5.9.5 to 5.12.3. I have encountered a crash of most of our GUI applications on Linux directly at start. These applications exhibited a floating point exception (FPE). For the record: we have purposely enabled floating point exceptions (specifically FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW) in our applications to catch floating point errors in our signal processing code. In the debugger I could identify that a call of reciprocal_mul_ps() (SSE4 instruction) with a vector containing a 0 (resulting in INF) was the reason of the FPE.
Backtrace:
(Suspended : Signal : SIGFPE:Arithmetic exception) reciprocal_mul_ps() at Qt5.12.3/source/qt/qtbase/src/gui/painting/qdrawhelper_sse4.cpp:101 0x7ffff6580e9f convertARGBFromARGB32PM_sse4<false, false>() at Qt5.12.3/source/qt/qtbase/src/gui/painting/qdrawhelper_sse4.cpp:122 0x7ffff6580e9f storeARGB32FromARGB32PM_sse4() at Qt5.12.3/source/qt/qtbase/src/gui/painting/qdrawhelper_sse4.cpp:297 0x7ffff6580e9f convert_generic() at Qt5.12.3/source/qt/qtbase/src/gui/image/qimage_conversions.cpp:216 0x7ffff662371e QImage::convertToFormat_helper() at Qt5.12.3/source/qt/qtbase/src/gui/image/qimage.cpp:2.087 0x7ffff6617d0f QImage::convertToFormat(QImage::Format, QFlags<Qt::ImageConversionFlag>) && at Qt5.12.3/source/qt/qtbase/include/QtGui/../../src/gui/image/qimage.h:194 0x7ffff2146024 QXcbWindow::setWindowIcon() at Qt5.12.3/source/qt/qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp:1.345 0x7ffff2146024 QXcbWindow::create() at Qt5.12.3/source/qt/qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp:524 0x7ffff21459fd QXcbIntegration::createPlatformWindow() at Qt5.12.3/source/qt/qtbase/src/plugins/platforms/xcb/qxcbintegration.cpp:267 0x7ffff212a2f4 QWindowPrivate::create() at Qt5.12.3/source/qt/qtbase/src/gui/kernel/qwindow.cpp:528 0x7ffff65d036f <...more frames...>
Other some more investigation I could narrow down the problem to a PNG file containing background transparency which is used as a window icon via QApplication::setWindowIcon() (to be precise the PNG file is embedded as Qt resource).
When I replace the PNG file with another one without transparency I don't get a FPE.
In the Qt git repository I found the commit dfa434a9799618eba48a84cbad279262679aa108 which optimized the SSE image conversion routines. This commit was made after Qt 5.9
Attachments
Issue Links
- duplicates
-
QTBUG-75592 Floating-point invalid operation in QIcon::pimap() / reciprocal_mul_ps()
- Closed