DreamSourceLab / DSView

An open source multi-function instrument for everyone
www.dreamsourcelab.com
GNU General Public License v3.0
1.13k stars 416 forks source link

Pressing ESC while searching for a signal pattern leads to segfault in libQt5Widgets #789

Open stefanct opened 4 months ago

stefanct commented 4 months ago

This is on Debian 12 with current HEAD (66ed68ea1759558082f392de1aa7643046fd39ae). When searching for the next occurrence of a signal pattern a small widget(?) is overlayed as an activity indicator. When I press the escape key (in anticipation that it aborts the search) DSView crashes. When executed within gdb I get the following (somewhat unhelpful) stack trace w/o debug symbols:

Thread 1 "DSView" received signal SIGSEGV, Segmentation fault.
0x00007ffff78231df in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
(gdb) bt
#0  0x00007ffff78231df in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#1  0x00007ffff780dc0c in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#2  0x00007ffff779b051 in QWidgetPrivate::paintBackground(QPainter*, QRegion const&, QFlags<QWidgetPrivate::DrawWidgetFlag>) const ()
    at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#3  0x00007ffff779d7cd in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4  0x00007ffff779ecd6 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x00007ffff779d64c in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags<QWidgetPrivate::DrawWidgetFlag>, QPainter*, QWidgetRepaintManager*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007ffff7774305 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007ffff77a5078 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007ffff785048e in QFrame::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007ffff7762fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff5eb1738 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff5eb46c1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
    at /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff5f0a193 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff7ea57a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff7ea5a38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff7ea5acc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007ffff5f09876 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff5eb01bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff5eb8316 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00005555555eabe5 in main ()

I have only observed this a few times (till I learned to to not press escape ;) but it was 100% reproducible.

dreamsource-tai commented 3 months ago

@stefanct We fixed this issue, thank you!