[pkg-lxqt-devel] Bug#905967: screengrab: Segfaults when save is selected
Bernhard Übelacker
bernhardu at mailbox.org
Fri Aug 17 23:12:11 BST 2018
Hello Helge,
just tried to reproduce the crash.
One note first, if you follow the advice in the following link
the backtrace could be much more meaningful for the maintainer
when at least for the crashing application, better for all
the shared objects in the backtrace the debugging symbols are installed.
https://wiki.debian.org/HowToGetABacktrace
But I tried to find to which location the last frame belongs and
came to the following location.
(gdb) disassemble 0x0000555555597537,0x0000555555597537+0x50
Dump of assembler code from 0x555555597537 to 0x555555597587:
0x0000555555597537 <MainWindow::saveScreen()+647>: callq 0x555555579ee0 <Config::getDefaultFormatID()>
0x000055555559753c <MainWindow::saveScreen()+652>: mov -0x90(%rbp),%rcx
0x0000555555597543 <MainWindow::saveScreen()+659>: cltq
0x0000555555597545 <MainWindow::saveScreen()+661>: movslq 0x8(%rcx),%rdx
0x0000555555597549 <MainWindow::saveScreen()+665>: add %rdx,%rax
0x000055555559754c <MainWindow::saveScreen()+668>: mov 0x10(%rcx,%rax,8),%rdx
0x0000555555597551 <MainWindow::saveScreen()+673>: mov %rdx,-0x88(%rbp)
=> 0x0000555555597558 <MainWindow::saveScreen()+680>: mov (%rdx),%eax
0x000055555559755a <MainWindow::saveScreen()+682>: add $0x1,%eax
0x000055555559755d <MainWindow::saveScreen()+685>: cmp $0x1,%eax
0x0000555555597560 <MainWindow::saveScreen()+688>: ja 0x555555597f48 <MainWindow::saveScreen()+3224>
0x0000555555597566 <MainWindow::saveScreen()+694>: mov -0xc8(%rbp),%rax
0x000055555559756d <MainWindow::saveScreen()+701>: lea -0x80(%rbp),%rdi
0x0000555555597571 <MainWindow::saveScreen()+705>: mov 0x80(%rax),%rsi
0x0000555555597578 <MainWindow::saveScreen()+712>: callq 0x555555579e00 <Config::getSaveFormat()>
...
End of assembler dump.
That would translate to:
(gdb) list MainWindow::saveScreen
555
556 void MainWindow::saveScreen()
557 {
...
565 // create initial filepath
566 QHash<QString, QString> formatsAvalible;
567 const QStringList formatIDs = _conf->getFormatIDs();
568 for (const QString &formatID : formatIDs)
569 formatsAvalible[formatID] = tr("%1 Files").arg(formatID.toUpper());
570
571 QString format = formatIDs.at(_conf->getDefaultFormatID()); <- Crash seems to happen on this line.
572 _conf->getSaveFormat();
...
Looking up what es behind these methods leads to the configuration file
that looks like it needs to have currently one of _imageFormats = {"png", "jpg"}.
$ grep defImgFormat ~/.config/screengrab/screengrab.conf
defImgFormat=jpg
Changing that line intentionally to something different leads to a crash at
the exact same address from your backtrace. Even just to a captial letter.
(gdb) bt
#0 QString::QString (other=..., this=0x7fffffffd728) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:942
#1 MainWindow::saveScreen (this=0x555555819130) at ./src/core/ui/mainwindow.cpp:571
#2 0x00007ffff66f7910 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd8c0, r=0x555555819130, this=0x555555874db0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:376
#3 QMetaObject::activate(QObject*, int, int, void**) () at kernel/qobject.cpp:3754
Therefore could you please lookup what this line looks like in your configuration file?
Kind regards,
Bernhard
-------------- next part --------------
apt update
apt install xserver-xorg lightdm openbox xterm dpkg-dev devscripts gdb valgrind screengrab mc
apt build-dep screengrab
mkdir -p screengrab/orig
cd screengrab/orig
apt source screengrab
cd ../..
mkdir -p libqt5core5a/orig
cd libqt5core5a/orig
apt source libqt5core5a-dbgsym
cd ../..
###########
gdb -q --args screengrab
directory /home/benutzer/screengrab/orig/screengrab-1.98
set height 0
set width 0
set pagination off
display/i $pc
b MainWindow::saveScreen
b *0x555555597558
run
(gdb) bt
#0 0x0000555555597558 in MainWindow::saveScreen() ()
#1 0x00007ffff66f9910 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00007ffff7029ef2 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#3 0x00007ffff702c500 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4 0x00007ffff7117d1d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5 0x00007ffff7117f55 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6 0x00007ffff7201caa in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7 0x00007ffff706e7d8 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8 0x00007ffff7201d53 in QToolButton::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9 0x00007ffff70304a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff7037d28 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff66d0579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff7037029 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff7089304 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff708be8e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff70304a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff7037ae0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff66d0579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff6a6f53b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#19 0x00007ffff6a71435 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#20 0x00007ffff6a4bb6b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#21 0x00007ffff0ee3e5b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#22 0x00007ffff66cf24b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff66d73c2 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x000055555557201c in main ()
apt install screengrab-dbgsym libqt5core5a-dbgsym libqt5widgets5-dbgsym libqt5gui5-dbgsym
gdb -q --args screengrab
directory /home/benutzer/screengrab/orig/screengrab-1.98
set height 0
set width 0
set pagination off
display/i $pc
b MainWindow::saveScreen
b *0x555555597558
run
cont
1: x/i $pc
=> 0x555555597558 <MainWindow::saveScreen()+680>: mov (%rdx),%eax
(gdb) bt
#0 QString::QString (other=..., this=0x7fffffffd728) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:942
#1 MainWindow::saveScreen (this=0x555555817ad0) at ./src/core/ui/mainwindow.cpp:571
#2 0x00007ffff66f9910 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd8c0, r=0x555555817ad0, this=0x55555585c5a0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:376
#3 QMetaObject::activate(QObject*, int, int, void**) () at kernel/qobject.cpp:3754
#4 0x00007ffff66f9dd7 in QMetaObject::activate (sender=sender at entry=0x55555589cad0, m=m at entry=0x7ffff74f9840 <QAction::staticMetaObject>, local_signal_index=local_signal_index at entry=1, argv=argv at entry=0x7fffffffd8c0) at kernel/qobject.cpp:3633
#5 0x00007ffff7029ef2 in QAction::triggered (this=this at entry=0x55555589cad0, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#6 0x00007ffff702c500 in QAction::activate (this=0x55555589cad0, event=<optimized out>) at kernel/qaction.cpp:1167
#7 0x00007ffff7117d1d in QAbstractButtonPrivate::click (this=0x55555589e870) at widgets/qabstractbutton.cpp:397
#8 0x00007ffff7117f55 in QAbstractButton::mouseReleaseEvent (this=0x55555589e670, e=0x7fffffffdd90) at widgets/qabstractbutton.cpp:1011
#9 0x00007ffff7201caa in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:622
#10 0x00007ffff706e7d8 in QWidget::event (this=0x55555589e670, event=0x7fffffffdd90) at kernel/qwidget.cpp:8919
#11 0x00007ffff7119193 in QAbstractButton::event (this=this at entry=0x55555589e670, e=e at entry=0x7fffffffdd90) at widgets/qabstractbutton.cpp:968
#12 0x00007ffff7201d53 in QToolButton::event (this=0x55555589e670, event=0x7fffffffdd90) at widgets/qtoolbutton.cpp:985
#13 0x00007ffff70304a1 in QApplicationPrivate::notify_helper (this=this at entry=0x5555557cdd30, receiver=receiver at entry=0x55555589e670, e=e at entry=0x7fffffffdd90) at kernel/qapplication.cpp:3727
#14 0x00007ffff7037d28 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3203
#15 0x00007ffff66d0579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at ../../include/QtCore/5.11.1/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:307
#16 0x00007ffff7037029 in QCoreApplication::sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#17 QApplicationPrivate::sendMouseEvent (receiver=receiver at entry=0x55555589e670, event=event at entry=0x7fffffffdd90, alienWidget=alienWidget at entry=0x55555589e670, nativeWidget=0x555555817ad0, buttonDown=buttonDown at entry=0x7ffff7528870 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:2695
#18 0x00007ffff7089304 in QWidgetWindow::handleMouseEvent(QMouseEvent*) () at /usr/include/c++/8/bits/atomic_base.h:390
#19 0x00007ffff708be8e in QWidgetWindow::event (this=0x5555559438d0, event=0x7fffffffe190) at kernel/qwidgetwindow.cpp:280
#20 0x00007ffff70304a1 in QApplicationPrivate::notify_helper (this=this at entry=0x5555557cdd30, receiver=receiver at entry=0x5555559438d0, e=e at entry=0x7fffffffe190) at kernel/qapplication.cpp:3727
#21 0x00007ffff7037ae0 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3486
#22 0x00007ffff66d0579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at ../../include/QtCore/5.11.1/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:307
#23 0x00007ffff6a6f53b in QCoreApplication::sendSpontaneousEvent (event=0x7fffffffe190, receiver=0x5555559438d0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:237
#24 QGuiApplicationPrivate::processMouseEvent (e=0x5555558d6fd0) at kernel/qguiapplication.cpp:2081
#25 0x00007ffff6a71435 in QGuiApplicationPrivate::processWindowSystemEvent (e=e at entry=0x5555558d6fd0) at kernel/qguiapplication.cpp:1816
#26 0x00007ffff6a4bb6b in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1032
#27 0x00007ffff0ee3e5b in QPAEventDispatcherGlib::processEvents (this=0x55555580d8d0, flags=...) at qeventdispatcher_glib.cpp:70
#28 0x00007ffff66cf24b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#29 0x00007ffff66d73c2 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#30 0x000055555557201c in main (argc=<optimized out>, argv=<optimized out>) at ./src/core/main.cpp:46
$ grep defImgFormat ~/.config/screengrab/screengrab.conf
defImgFormat=jpg
Intentionally changing to:
defImgFormat=jpG
dpkg --purge screengrab-dbgsym libqt5core5a-dbgsym libqt5widgets5-dbgsym libqt5gui5-dbgsym
$ gdb -q --args screengrab
Reading symbols from screengrab...(no debugging symbols found)...done.
(gdb) set height 0
(gdb) set width 0
(gdb) set pagination off
(gdb) display/i $pc
1: x/i $pc
<error: No registers.>
(gdb) run
Starting program: /usr/bin/screengrab
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee6a1700 (LWP 3053)]
[New Thread 0x7fffed782700 (LWP 3054)]
libGL error: pci id for fd 12: 1234:1111, driver (null)
libGL error: No driver found
libGL error: failed to load driver: (null)
[New Thread 0x7fffe6021700 (LWP 3055)]
[New Thread 0x7fffe5820700 (LWP 3056)]
[New Thread 0x7fffe501f700 (LWP 3057)]
[New Thread 0x7fffe481e700 (LWP 3058)]
[New Thread 0x7fffcffff700 (LWP 3059)]
[New Thread 0x7fffcf7fe700 (LWP 3060)]
[New Thread 0x7fffceffd700 (LWP 3061)]
[New Thread 0x7fffce7fc700 (LWP 3062)]
Thread 1 "screengrab" received signal SIGSEGV, Segmentation fault.
0x0000555555597558 in MainWindow::saveScreen() ()
1: x/i $pc
=> 0x555555597558 <_ZN10MainWindow10saveScreenEv+680>: mov (%rdx),%eax
(gdb) bt
#0 0x0000555555597558 in MainWindow::saveScreen() ()
#1 0x00007ffff66f7910 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00007ffff7027ef2 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#3 0x00007ffff702a500 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4 0x00007ffff7115d1d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5 0x00007ffff7115f55 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6 0x00007ffff71ffcaa in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7 0x00007ffff706c7d8 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8 0x00007ffff71ffd53 in QToolButton::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9 0x00007ffff702e4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff7035d28 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff66ce579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff7035029 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff7087304 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff7089e8e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff702e4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff7035ae0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff66ce579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff6a6d53b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#19 0x00007ffff6a6f435 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#20 0x00007ffff6a49b6b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#21 0x00007ffff0edfe5b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#22 0x00007ffff66cd24b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff66d53c2 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x000055555557201c in main ()
apt install screengrab-dbgsym libqt5core5a-dbgsym libqt5widgets5-dbgsym libqt5gui5-dbgsym
$ gdb -q --args screengrab
Reading symbols from screengrab...Reading symbols from /usr/lib/debug/.build-id/3f/221233e44d995ae91f3752e4194dfac5195d34.debug...done.
done.
(gdb) directory /home/benutzer/screengrab/orig/screengrab-1.98
Source directories searched: /home/benutzer/screengrab/orig/screengrab-1.98:$cdir:$cwd
(gdb) set height 0
(gdb) set width 0
(gdb) set pagination off
(gdb) display/i $pc
1: x/i $pc
<error: No registers.>
(gdb) run
Starting program: /usr/bin/screengrab
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee6a1700 (LWP 3136)]
[New Thread 0x7fffed782700 (LWP 3137)]
libGL error: pci id for fd 12: 1234:1111, driver (null)
libGL error: No driver found
libGL error: failed to load driver: (null)
[New Thread 0x7fffe6021700 (LWP 3138)]
[New Thread 0x7fffe5820700 (LWP 3139)]
[New Thread 0x7fffe501f700 (LWP 3140)]
[New Thread 0x7fffe481e700 (LWP 3141)]
[New Thread 0x7fffcffff700 (LWP 3142)]
[New Thread 0x7fffcf7fe700 (LWP 3143)]
[New Thread 0x7fffceffd700 (LWP 3144)]
[New Thread 0x7fffce7fc700 (LWP 3145)]
Thread 1 "screengrab" received signal SIGSEGV, Segmentation fault.
QString::QString (other=..., this=0x7fffffffd728) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:942
warning: Source file is more recent than executable.
942 inline QChar *QString::data()
1: x/i $pc
=> 0x555555597558 <MainWindow::saveScreen()+680>: mov (%rdx),%eax
(gdb) bt
#0 QString::QString (other=..., this=0x7fffffffd728) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:942
#1 MainWindow::saveScreen (this=0x555555819130) at ./src/core/ui/mainwindow.cpp:571
#2 0x00007ffff66f7910 in QtPrivate::QSlotObjectBase::call (a=0x7fffffffd8c0, r=0x555555819130, this=0x555555874db0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:376
#3 QMetaObject::activate(QObject*, int, int, void**) () at kernel/qobject.cpp:3754
#4 0x00007ffff66f7dd7 in QMetaObject::activate (sender=sender at entry=0x5555558b6ea0, m=m at entry=0x7ffff74f7840 <QAction::staticMetaObject>, local_signal_index=local_signal_index at entry=1, argv=argv at entry=0x7fffffffd8c0) at kernel/qobject.cpp:3633
#5 0x00007ffff7027ef2 in QAction::triggered (this=this at entry=0x5555558b6ea0, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#6 0x00007ffff702a500 in QAction::activate (this=0x5555558b6ea0, event=<optimized out>) at kernel/qaction.cpp:1167
#7 0x00007ffff7115d1d in QAbstractButtonPrivate::click (this=0x5555558b8e10) at widgets/qabstractbutton.cpp:397
#8 0x00007ffff7115f55 in QAbstractButton::mouseReleaseEvent (this=0x5555558b8c10, e=0x7fffffffdd90) at widgets/qabstractbutton.cpp:1011
#9 0x00007ffff71ffcaa in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:622
#10 0x00007ffff706c7d8 in QWidget::event (this=0x5555558b8c10, event=0x7fffffffdd90) at kernel/qwidget.cpp:8919
#11 0x00007ffff7117193 in QAbstractButton::event (this=this at entry=0x5555558b8c10, e=e at entry=0x7fffffffdd90) at widgets/qabstractbutton.cpp:968
#12 0x00007ffff71ffd53 in QToolButton::event (this=0x5555558b8c10, event=0x7fffffffdd90) at widgets/qtoolbutton.cpp:985
#13 0x00007ffff702e4a1 in QApplicationPrivate::notify_helper (this=this at entry=0x5555557cdd30, receiver=receiver at entry=0x5555558b8c10, e=e at entry=0x7fffffffdd90) at kernel/qapplication.cpp:3727
#14 0x00007ffff7035d28 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3203
#15 0x00007ffff66ce579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at ../../include/QtCore/5.11.1/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:307
#16 0x00007ffff7035029 in QCoreApplication::sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#17 QApplicationPrivate::sendMouseEvent (receiver=receiver at entry=0x5555558b8c10, event=event at entry=0x7fffffffdd90, alienWidget=alienWidget at entry=0x5555558b8c10, nativeWidget=0x555555819130, buttonDown=buttonDown at entry=0x7ffff7526870 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:2695
#18 0x00007ffff7087304 in QWidgetWindow::handleMouseEvent(QMouseEvent*) () at /usr/include/c++/8/bits/atomic_base.h:390
#19 0x00007ffff7089e8e in QWidgetWindow::event (this=0x55555595d030, event=0x7fffffffe190) at kernel/qwidgetwindow.cpp:280
#20 0x00007ffff702e4a1 in QApplicationPrivate::notify_helper (this=this at entry=0x5555557cdd30, receiver=receiver at entry=0x55555595d030, e=e at entry=0x7fffffffe190) at kernel/qapplication.cpp:3727
#21 0x00007ffff7035ae0 in QApplication::notify(QObject*, QEvent*) () at kernel/qapplication.cpp:3486
#22 0x00007ffff66ce579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at ../../include/QtCore/5.11.1/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:307
#23 0x00007ffff6a6d53b in QCoreApplication::sendSpontaneousEvent (event=0x7fffffffe190, receiver=0x55555595d030) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:237
#24 QGuiApplicationPrivate::processMouseEvent (e=0x5555559a2f20) at kernel/qguiapplication.cpp:2081
#25 0x00007ffff6a6f435 in QGuiApplicationPrivate::processWindowSystemEvent (e=e at entry=0x5555559a2f20) at kernel/qguiapplication.cpp:1816
#26 0x00007ffff6a49b6b in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1032
#27 0x00007ffff0edfe5b in QPAEventDispatcherGlib::processEvents (this=0x5555557d1680, flags=...) at qeventdispatcher_glib.cpp:70
#28 0x00007ffff66cd24b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#29 0x00007ffff66d53c2 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#30 0x000055555557201c in main (argc=<optimized out>, argv=<optimized out>) at ./src/core/main.cpp:46
(gdb) disassemble 0x0000555555597537,0x0000555555597537+0x50
Dump of assembler code from 0x555555597537 to 0x555555597587:
0x0000555555597537 <MainWindow::saveScreen()+647>: callq 0x555555579ee0 <Config::getDefaultFormatID()>
0x000055555559753c <MainWindow::saveScreen()+652>: mov -0x90(%rbp),%rcx
0x0000555555597543 <MainWindow::saveScreen()+659>: cltq
0x0000555555597545 <MainWindow::saveScreen()+661>: movslq 0x8(%rcx),%rdx
0x0000555555597549 <MainWindow::saveScreen()+665>: add %rdx,%rax
0x000055555559754c <MainWindow::saveScreen()+668>: mov 0x10(%rcx,%rax,8),%rdx
0x0000555555597551 <MainWindow::saveScreen()+673>: mov %rdx,-0x88(%rbp)
=> 0x0000555555597558 <MainWindow::saveScreen()+680>: mov (%rdx),%eax
0x000055555559755a <MainWindow::saveScreen()+682>: add $0x1,%eax
0x000055555559755d <MainWindow::saveScreen()+685>: cmp $0x1,%eax
0x0000555555597560 <MainWindow::saveScreen()+688>: ja 0x555555597f48 <MainWindow::saveScreen()+3224>
0x0000555555597566 <MainWindow::saveScreen()+694>: mov -0xc8(%rbp),%rax
0x000055555559756d <MainWindow::saveScreen()+701>: lea -0x80(%rbp),%rdi
0x0000555555597571 <MainWindow::saveScreen()+705>: mov 0x80(%rax),%rsi
0x0000555555597578 <MainWindow::saveScreen()+712>: callq 0x555555579e00 <Config::getSaveFormat()>
0x000055555559757d <MainWindow::saveScreen()+717>: mov -0x80(%rbp),%rdi
0x0000555555597581 <MainWindow::saveScreen()+721>: mov (%rdi),%eax
0x0000555555597583 <MainWindow::saveScreen()+723>: test %eax,%eax
0x0000555555597585 <MainWindow::saveScreen()+725>: je 0x555555597c18 <MainWindow::saveScreen()+2408>
End of assembler dump.
(gdb) list
942 inline QChar *QString::data()
943 { detach(); return reinterpret_cast<QChar*>(d->data()); }
(gdb) list MainWindow::saveScreen
555
556 void MainWindow::saveScreen()
557 {
558 bool wasMinimized(isMinimized());
559 if (wasMinimized)
560 {
561 showNormal();
562 disableTrayMenuActions(true);
563 }
564
565 // create initial filepath
566 QHash<QString, QString> formatsAvalible;
567 const QStringList formatIDs = _conf->getFormatIDs();
568 for (const QString &formatID : formatIDs)
569 formatsAvalible[formatID] = tr("%1 Files").arg(formatID.toUpper());
570
571 QString format = formatIDs.at(_conf->getDefaultFormatID());
572 _conf->getSaveFormat();
...
./src/core/config.cpp:QStringList Config::getFormatIDs() const
./src/core/config.cpp-{
./src/core/config.cpp- return _imageFormats;
./src/core/config.cpp:const static QStringList _imageFormats = {"png", "jpg"};
./src/core/config.cpp:int Config::getDefaultFormatID()
./src/core/config.cpp-{
./src/core/config.cpp- return _imageFormats.indexOf(getSaveFormat());
./src/core/config.cpp:QString Config::getSaveFormat()
./src/core/config.cpp-{
./src/core/config.cpp- return value(KEY_SAVEFORMAT).toString();
./src/core/config.cpp:#define KEY_SAVEFORMAT "defImgFormat"
More information about the pkg-lxqt-devel
mailing list