Bug 413361 - Spectacle crashes every time when capturing a rectangular region
Summary: Spectacle crashes every time when capturing a rectangular region
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 19.08.1
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2019-10-23 11:14 UTC by Lukasz Biegaj
Modified: 2021-12-13 22:07 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Biegaj 2019-10-23 11:14:45 UTC
Application: spectacle (19.08.1)

Qt Version: 5.11.3
Frameworks Version: 5.62.0
Operating System: Linux 5.2.0-3-amd64 x86_64
Distribution: Debian GNU/Linux bullseye/sid

-- Information about the crash:
- What I was doing when the application crashed:

Spectacle crashes every time when capturing a rectangular region.
Crash does not occur when capturing whole screen or a window.

When executed from commandline, spectacle reports:
kf5.kconfig.core: "\"cropRegion\" - conversion of \"0,0,0,0\" to QRect failed"
free(): invalid pointer

The crash can be reproduced every time.

-- Backtrace:
Application: Spectacle (spectacle), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f59c4a29800 (LWP 20888))]

Thread 4 (Thread 0x7f59bb347700 (LWP 20891)):
#0  futex_wait_cancelable (private=0, expected=0, futex_word=0x55b83c7712f8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1  __pthread_cond_wait_common (abstime=0x0, mutex=0x55b83c7712a8, cond=0x55b83c7712d0) at pthread_cond_wait.c:502
#2  __pthread_cond_wait (cond=0x55b83c7712d0, mutex=0x55b83c7712a8) at pthread_cond_wait.c:655
#3  0x00007f59bb82330b in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007f59bb822f27 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007f59c7ce7fb7 in start_thread (arg=<optimized out>) at pthread_create.c:486
#6  0x00007f59c8eff2ef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f59c251c700 (LWP 20890)):
#0  0x00007f59c8ef4d2f in __GI___poll (fds=0x7f59b4004e30, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f59c710609e in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f59c71061bf in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f59c945b3e3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f59c9408cfb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f59c9258d8e in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f59c9c3b545 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f59c9262a07 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f59c7ce7fb7 in start_thread (arg=<optimized out>) at pthread_create.c:486
#9  0x00007f59c8eff2ef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f59c3be4700 (LWP 20889)):
#0  0x00007f59c8ef4d2f in __GI___poll (fds=0x7f59c3be3cb8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f59ca957cf7 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f59ca95991a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f59c435fd79 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f59c9262a07 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f59c7ce7fb7 in start_thread (arg=<optimized out>) at pthread_create.c:486
#6  0x00007f59c8eff2ef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f59c4a29800 (LWP 20888)):
[KCrash Handler]
#6  tcache_get (tc_idx=5) at malloc.c:2952
#7  __GI___libc_malloc (bytes=96) at malloc.c:3060
#8  0x00007f59c9a2baa8 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#9  0x00007f59c9a2f43d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#10 0x00007f59c9a350b1 in QPathClipper::clip(QPathClipper::Operation) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#11 0x00007f59c9a21420 in QPainterPath::simplified() const () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#12 0x00007f59c9a35392 in QPathClipper::clip(QPathClipper::Operation) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#13 0x00007f59c9a21279 in QPainterPath::subtracted(QPainterPath const&) const () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#14 0x00007f59c9a212bd in QPainterPath::operator-(QPainterPath const&) const () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#15 0x00007f59c9a2130a in QPainterPath::operator-=(QPainterPath const&) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#16 0x00007f59c989ef37 in QTextLayout::draw(QPainter*, QPointF const&, QVector<QTextLayout::FormatRange> const&, QRectF const&) const () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#17 0x00007f59ca08c2e2 in QWidgetLineControl::draw(QPainter*, QPoint const&, QRect const&, int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f59ca082132 in QLineEdit::paintEvent(QPaintEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f59c9f8b518 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007f59ca086e3a in QLineEdit::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f59c9f4d501 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f59c9f549b0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f59c940a029 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007f59c9f8410a in QWidgetPrivate::sendPaintEvent(QRegion const&) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007f59c9f849c7 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007f59c9f855c1 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f59c9f8464c in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007f59c9f855c1 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007f59c9f8464c in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007f59c9f855c1 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007f59c9f854b0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007f59c9f8464c in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#43 0x00007f59c9f5cadc in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#44 0x00007f59c9f5cd14 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#45 0x00007f59c9fa811c in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#46 0x00007f59c9fa8a32 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#47 0x00007f59c9f4d501 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#48 0x00007f59c9f549b0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#49 0x00007f59c940a029 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007f59c97b6243 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#51 0x00007f59c97b6eed in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#52 0x00007f59c979106b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#53 0x00007f59c43f639b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#54 0x00007f59c9408cfb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#55 0x00007f59c9410cd2 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#56 0x000055b83ae71948 in ?? ()
#57 0x00007f59c8e2bbbb in __libc_start_main (main=0x55b83ae70240, argc=2, argv=0x7ffd75817958, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd75817948) at ../csu/libc-start.c:308
#58 0x000055b83ae7238a in ?? ()
[Inferior 1 (process 20888) detached]

Reported using DrKonqi
Comment 1 David Redondo 2019-10-23 12:30:27 UTC
When does it crash? Right when you click the button or when selecting the region?
Does this happen on X or on Wayland?
Comment 2 Bug Janitor Service 2019-11-07 04:33:09 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Lukasz Biegaj 2019-11-07 13:40:32 UTC
Sorry for the late reply - it seems that I've missed the notification.

Crash happens after selecting a rectangular region and doublicking it to apply. I see the spectacle main window update for a brief time and then it crashes.

Also, today I've found a workaround - after disabling the compositor taking screenshots works fine.
Comment 4 Lukasz Biegaj 2019-11-07 13:41:06 UTC
Also, this is regards to X. I don't use Wayland.
Comment 5 S. Umar 2020-01-27 14:02:07 UTC
I can confirm this on Fedora 31 with 19.08.3 and 19.12.1 using X11.
It works fine on my Lenovo laptop with Intel HD graphics but the
reported bug happens on my desktop with Nvidia propriety drivers.
Comment 6 S. Umar 2020-01-27 14:48:46 UTC
Another possibility is that my desktop has 3 monitors connected to it whereas the laptop is naturally one.

What happens is that the spectacle keeps running in the background but the entire gui is gone. If one chooses a full screen shot it works fine.
Comment 7 Dave Morley 2020-03-20 10:20:33 UTC
Hi guys
I can confirm that with a laptop plugged into an additional Monitor I get the following on KDE NEON (Up-to-date)
spectacle 
kf5.kconfig.core: "\"cropRegion\" - conversion of \"0,0,0,0\" to QRect failed"
And the app closes no crash report

However without the additional monitor in place I get the rectangular region but with the same error.
Comment 8 Nate Graham 2021-12-13 21:17:44 UTC
Spectacle's code has changed a lot since this crash was reported, and there haven't been any more reports in almost two years. Are you still experiencing this issue in Spectacle 21.12?
Comment 9 S. Umar 2021-12-13 22:07:15 UTC
It is resolved in updated versions...