Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923496 - sci-calculators/speedcrunch-0.12.0-r1: crash with dev-qt/qtgui-5.15.12
Summary: sci-calculators/speedcrunch-0.12.0-r1: crash with dev-qt/qtgui-5.15.12
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-01 23:13 UTC by doj
Modified: 2024-02-08 06:58 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info (emerge--info.txt,6.40 KB, text/plain)
2024-02-01 23:14 UTC, doj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description doj 2024-02-01 23:13:08 UTC
my system has recently updated to QT 5.12.5 and that now causes the speedcrunch application to crash. When I run it with gdb I see the following stack trace:

Thread 1 "speedcrunch" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff722ac20 in QPainter::fillRect(QRect const&, QBrush const&) () from /usr/lib64/libQt5Gui.so.5
#2  0x00007ffff77a0b24 in QWidgetPrivate::paintBackground(QPainter*, QRegion const&, QFlags<QWidgetPrivate::DrawWidgetFlag>) const ()
   from /usr/lib64/libQt5Widgets.so.5
#3  0x00007ffff77a4772 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () from /usr/lib64/libQt5Widgets.so.5
#4  0x00007ffff777705e in ?? () from /usr/lib64/libQt5Widgets.so.5
#5  0x00007ffff77775fa in ?? () from /usr/lib64/libQt5Widgets.so.5
#6  0x00007ffff77ccfc8 in ?? () from /usr/lib64/libQt5Widgets.so.5
#7  0x00007ffff77643fe in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#8  0x00007ffff6ac12e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#9  0x00007ffff6f31f0d in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from /usr/lib64/libQt5Gui.so.5
#10 0x00007ffff6f03feb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#11 0x00007ffff33421b3 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#12 0x00007ffff6abfd4b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#13 0x00007ffff6ac8170 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#14 0x00005555555ab6ee in main ()

I initially did rebuild all dependencies of speedcrunch, but I have the same crashing result.
I have then rebuild QT 5.15.11 and the speedcrunch program runs as expected.

Reproducible: Always

Steps to Reproduce:
1. start the speedcrunch program.
Comment 1 doj 2024-02-01 23:14:50 UTC
Created attachment 883968 [details]
emerge info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-03 05:28:01 UTC
Can you try with debugging symbols for dev-qt/* (no need for qtwebengine) and speedcrunch if not already got them? Maybe try with -O2 at the same time and I imagine it'll go away.

fillRect is suspicious and it's been the source of problems before. Think it came up in anotehr bug recently but not sure which.
Comment 3 doj 2024-02-07 22:27:23 UTC
here's a screenshot of my gdb session. I don't see anything wrong with the "d" or "d->extended" objects, but it seems that the virtual function call to fillRect() is crashing.
I don't know how to debug this, but I assume that this version of QT 5.15.12 simply doesn't set up these C++ objects correctly.
It's probably not a gentoo bug, but rather a QT bug.
But if you see more crash reports in Gentoo with this version of QT, you should remove this QT version from the list of stable versions.
I've looked at the qt.io bug tracker, but currently no open issue for a crash when calling fillRect().
Maybe I should create a bug report for QT developers.

┌─/usr/src/debug/dev-qt/qtgui-5.15.12/qtbase-everywhere-src-5.15.12/src/gui/painting/qpainter.cpp──────────────────────────────────────────────────────────────────┐
│     6983      \fn void QPainter::fillRect(const QRect &rectangle, const QBrush &brush)                                                                           │
│     6984      \overload                                                                                                                                          │
│     6985                                                                                                                                                         │
│     6986      Fills the given \a rectangle with the specified \a brush.                                                                                          │
│     6987  */                                                                                                                                                     │
│     6988                                                                                                                                                         │
│     6989  void QPainter::fillRect(const QRect &r, const QBrush &brush)                                                                                           │
│     6990  {                                                                                                                                                      │
│     6991      Q_D(QPainter);                                                                                                                                     │
│     6992                                                                                                                                                         │
│     6993      if (!d->engine)                                                                                                                                    │
│     6994          return;                                                                                                                                        │
│     6995                                                                                                                                                         │
│     6996      if (d->extended && !needsEmulation(brush)) {                                                                                                       │
│  >  6997          d->extended->fillRect(r, brush);                                                                                                               │
│     6998          return;                                                                                                                                        │
│     6999      }                                                                                                                                                  │
│     7000                                                                                                                                                         │
│     7001      QPen oldPen = pen();                                                                                                                               │
│     7002      QBrush oldBrush = this->brush();                                                                                                                   │
│     7003      setPen(Qt::NoPen);                                                                                                                                 │
│     7004      if (brush.style() == Qt::SolidPattern) {                                                                                                           │
│     7005          d->colorBrush.setStyle(Qt::SolidPattern);                                                                                                      │
│     7006          d->colorBrush.setColor(brush.color());                                                                                                         │
│     7007          setBrush(d->colorBrush);                                                                                                                       │
│     7008      } else {                                                                                                                                           │
│     7009          setBrush(brush);                                                                                                                               │
│     7010      }                                                                                                                                                  │
│     7011                                                                                                                                                         │
│     7012      drawRect(r);                                                                                                                                       │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
multi-thre Thread 0x7ffff74911 In: QPainter::fillRect                                                                                      L6997 PC: 0x7ffff722ac20 
(gdb) p d
$1 = (QPainterPrivate * const) 0x555555c0c4e0
(gdb) p d->extended
$2 = (QPaintEngineEx *) 0x555555b6a110
(gdb) p d->extended->fillRect
cannot resolve overloaded method `fillRect': no arguments supplied
(gdb) p d->extended->fillRect(r,brush)
Cannot resolve method QPaintEngineEx::fillRect to any overloaded instance
The type: 'QPaintEngineEx *' isn't fully known to GDB. Please cast it directly to the desired typed in the function call.
(gdb) p *(d->extended)
$3 = {<QPaintEngine> = {_vptr.QPaintEngine = 0x7ffff747a330 <vtable for QRasterPaintEngine+16>, state = 0x555555c1de38, gccaps = {i = 4294967295}, active = 1,
    selfDestruct = 0, extended = 1, d_ptr = {d = 0x555555a51910}}, <No data fields>}
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-08 06:58:56 UTC
Qt don't maintain the 5.15.x for FOSS releases anymore. We'd need to first reproduce this with Qt 6 and/or report it to KDE's Qt5PatchCollection.

Although if it were reproducible without any of the backports, maybe Qt would be interested.

Anyway, let's see what asturm says.