Bug 403647

Summary: Latte crashes when using hotkeys
Product: [Unmaintained] lattedock Reporter: trmdi
Component: applicationAssignee: Michail Vourlakos <mvourlakos>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: git (master)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description trmdi 2019-01-27 06:46:55 UTC
When I press Win+` -> Latte crashes.

Application: Latte Dock (latte-dock), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ff699431680 (LWP 6505))]

Thread 8 (Thread 0x7ff66787f700 (LWP 6698)):
#0  0x00007ff69cf93d34 in read () at /lib64/libc.so.6
#1  0x00007ff681e5aec1 in pa_read () at /usr/lib64/pulseaudio/libpulsecommon-12.2.so
#2  0x00007ff681f184fe in pa_mainloop_prepare () at /usr/lib64/libpulse.so.0
#3  0x00007ff681f18f60 in pa_mainloop_iterate () at /usr/lib64/libpulse.so.0
#4  0x00007ff681f19020 in pa_mainloop_run () at /usr/lib64/libpulse.so.0
#5  0x00007ff681f27039 in  () at /usr/lib64/libpulse.so.0
#6  0x00007ff681e89e28 in  () at /usr/lib64/pulseaudio/libpulsecommon-12.2.so
#7  0x00007ff69b993554 in start_thread () at /lib64/libpthread.so.0
#8  0x00007ff69cfa2ccf in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7ff6752ec700 (LWP 6601)):
#0  0x00007ffcf92f096e in  ()
#1  0x00007ff69cfb0876 in clock_gettime () at /lib64/libc.so.6
#2  0x00007ff69da751a1 in  () at /usr/lib64/libQt5Core.so.5
#3  0x00007ff69da739e9 in QTimerInfoList::updateCurrentTime() () at /usr/lib64/libQt5Core.so.5
#4  0x00007ff69da75cf5 in  () at /usr/lib64/libQt5Core.so.5
#5  0x00007ff69a78d9e1 in g_main_context_check () at /usr/lib64/libglib-2.0.so.0
#6  0x00007ff69a78df60 in  () at /usr/lib64/libglib-2.0.so.0
#7  0x00007ff69a78e0dc in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#8  0x00007ff69da7588b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#9  0x00007ff69da2002b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#10 0x00007ff69d86a3b6 in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#11 0x00007ff675dcf8b7 in KCupsConnection::run() () at /usr/lib64/libkcupslib.so
#12 0x00007ff69d86b702 in  () at /usr/lib64/libQt5Core.so.5
#13 0x00007ff69b993554 in start_thread () at /lib64/libpthread.so.0
#14 0x00007ff69cfa2ccf in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7ff6777fe700 (LWP 6591)):
#0  0x00007ff69a78d82f in g_main_context_check () at /usr/lib64/libglib-2.0.so.0
#1  0x00007ff69a78df60 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007ff69a78e0dc in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3  0x00007ff69da7588b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007ff69da2002b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5  0x00007ff69d86a3b6 in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#6  0x00007ff69d86b702 in  () at /usr/lib64/libQt5Core.so.5
#7  0x00007ff69b993554 in start_thread () at /lib64/libpthread.so.0
#8  0x00007ff69cfa2ccf in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7ff677fff700 (LWP 6589)):
#0  0x00007ff69a7d4ea9 in g_mutex_lock () at /usr/lib64/libglib-2.0.so.0
#1  0x00007ff69a78d6f1 in g_main_context_query () at /usr/lib64/libglib-2.0.so.0
#2  0x00007ff69a78df37 in  () at /usr/lib64/libglib-2.0.so.0
#3  0x00007ff69a78e0dc in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#4  0x00007ff69da7588b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5  0x00007ff69da2002b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#6  0x00007ff69d86a3b6 in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#7  0x00007ff6804a4c55 in  () at /usr/lib64/qt5/qml/QtQuick/XmlListModel/libqmlxmllistmodelplugin.so
#8  0x00007ff69d86b702 in  () at /usr/lib64/libQt5Core.so.5
#9  0x00007ff69b993554 in start_thread () at /lib64/libpthread.so.0
#10 0x00007ff69cfa2ccf in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7ff68cf30700 (LWP 6534)):
#0  0x00007ff69b9994dc in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007ff68d3d9083 in  () at /usr/lib64/dri/i965_dri.so
#2  0x00007ff68d3d8dd7 in  () at /usr/lib64/dri/i965_dri.so
#3  0x00007ff69b993554 in start_thread () at /lib64/libpthread.so.0
#4  0x00007ff69cfa2ccf in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7ff68f5ef700 (LWP 6533)):
#0  0x00007ff69cf982c9 in poll () at /lib64/libc.so.6
#1  0x00007ff69a78dfb6 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007ff69a78e0dc in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3  0x00007ff69da7588b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007ff69da2002b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5  0x00007ff69d86a3b6 in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#6  0x00007ff69eff3f25 in  () at /usr/lib64/libQt5Qml.so.5
#7  0x00007ff69d86b702 in  () at /usr/lib64/libQt5Core.so.5
#8  0x00007ff69b993554 in start_thread () at /lib64/libpthread.so.0
#9  0x00007ff69cfa2ccf in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7ff695a8d700 (LWP 6513)):
#0  0x00007ff69cf982c9 in poll () at /lib64/libc.so.6
#1  0x00007ff69a78dfb6 in  () at /usr/lib64/libglib-2.0.so.0
#2  0x00007ff69a78e0dc in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#3  0x00007ff69da7588b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#4  0x00007ff69da2002b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#5  0x00007ff69d86a3b6 in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#6  0x00007ff69e9c6565 in  () at /usr/lib64/libQt5DBus.so.5
#7  0x00007ff69d86b702 in  () at /usr/lib64/libQt5Core.so.5
#8  0x00007ff69b993554 in start_thread () at /lib64/libpthread.so.0
#9  0x00007ff69cfa2ccf in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7ff699431680 (LWP 6505)):
[KCrash Handler]
#4  0x00007ff69def7678 in QTextLine::y() const () at /usr/lib64/libQt5Gui.so.5
#5  0x00007ff69f3ec6aa in QQuickTextPrivate::setupTextLayout(double*) () at /usr/lib64/libQt5Quick.so.5
#6  0x00007ff69f3ed548 in QQuickTextPrivate::updateSize() () at /usr/lib64/libQt5Quick.so.5
#7  0x00007ff69f3eeb1b in QQuickTextPrivate::updateLayout() () at /usr/lib64/libQt5Quick.so.5
#8  0x00007ff69f3ef377 in QQuickText::setText(QString const&) () at /usr/lib64/libQt5Quick.so.5
#9  0x00007ff69f3f0a89 in  () at /usr/lib64/libQt5Quick.so.5
#10 0x00007ff69efcb92f in  () at /usr/lib64/libQt5Qml.so.5
#11 0x00007ff69efcc067 in  () at /usr/lib64/libQt5Qml.so.5
#12 0x00007ff69efc8903 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () at /usr/lib64/libQt5Qml.so.5
#13 0x00007ff69efa6693 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () at /usr/lib64/libQt5Qml.so.5
#14 0x00007ff69ef495d2 in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) () at /usr/lib64/libQt5Qml.so.5
#15 0x00007ff69da4a9df in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib64/libQt5Core.so.5
#16 0x00007ff69ef45583 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) () at /usr/lib64/libQt5Qml.so.5
#17 0x00007ff69efcb8b2 in  () at /usr/lib64/libQt5Qml.so.5
#18 0x00007ff69efcc067 in  () at /usr/lib64/libQt5Qml.so.5
#19 0x00007ff69efc8903 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () at /usr/lib64/libQt5Qml.so.5
#20 0x00007ff69efa6693 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () at /usr/lib64/libQt5Qml.so.5
#21 0x00007ff69ef495d2 in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) () at /usr/lib64/libQt5Qml.so.5
#22 0x00007ff69da4a9df in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib64/libQt5Core.so.5
#23 0x00007ff69ef45583 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) () at /usr/lib64/libQt5Qml.so.5
#24 0x00007ff69efcb8b2 in  () at /usr/lib64/libQt5Qml.so.5
#25 0x00007ff69efcc067 in  () at /usr/lib64/libQt5Qml.so.5
#26 0x00007ff69efc8903 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () at /usr/lib64/libQt5Qml.so.5
#27 0x00007ff69efa6693 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) () at /usr/lib64/libQt5Qml.so.5
#28 0x00007ff69ef495d2 in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) () at /usr/lib64/libQt5Qml.so.5
#29 0x00007ff69da4a9df in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib64/libQt5Core.so.5
#30 0x00007ff69ef45583 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) () at /usr/lib64/libQt5Qml.so.5
#31 0x00007ff69eea3334 in QV4::QObjectWrapper::setProperty(QV4::ExecutionEngine*, QObject*, QQmlPropertyData*, QV4::Value const&) () at /usr/lib64/libQt5Qml.so.5
#32 0x00007ff6746c2ce5 in  ()
#33 0x0000000000000000 in  ()
[Inferior 1 (process 6505) detached]
Comment 1 trmdi 2019-01-27 06:57:31 UTC
latte-dock -d:
------------------
[warning 13:53:48.579579] - file:///usr/lib64/qt5/qml/org/kde/latte/BadgeText.qml:122:5: QML Text: Binding loop detected for property "width"
KCrash: Attempting to start /usr/bin/latte-dock directly
KCrash: Application 'latte-dock' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi directly
Comment 2 Michail Vourlakos 2019-01-27 08:31:17 UTC
(In reply to trmdi from comment #1)
> latte-dock -d:
> ------------------
> [warning 13:53:48.579579] -
> file:///usr/lib64/qt5/qml/org/kde/latte/BadgeText.qml:122:5: QML Text:
> Binding loop detected for property "width"
> KCrash: Attempting to start /usr/bin/latte-dock directly
> KCrash: Application 'latte-dock' crashing...
> KCrash: Attempting to start /usr/lib64/libexec/drkonqi directly

please retest with last commit, I fixed a binding loop for height in there and it could be relevant. The binding loop for width I can not reproduce yet in my system
Comment 3 trmdi 2019-01-27 10:41:45 UTC
(In reply to Michail Vourlakos from comment #2)
> please retest with last commit, I fixed a binding loop for height in there
> and it could be relevant. The binding loop for width I can not reproduce yet
> in my system

Still happens with ffc1669c.

If I change the line 126 to e.g: width: 10, it will not crash, but the hotkey will not trigger anything.
Comment 4 Michail Vourlakos 2019-01-27 11:13:09 UTC
Can you send your layout file in case it could to reproduce?
Comment 5 trmdi 2019-01-27 11:35:58 UTC
(In reply to Michail Vourlakos from comment #4)
> Can you send your layout file in case it could to reproduce?

My layout https://bugs.kde.org/attachment.cgi?id=117148
Comment 6 Michail Vourlakos 2019-01-27 11:44:18 UTC
(In reply to trmdi from comment #5)
> (In reply to Michail Vourlakos from comment #4)
> > Can you send your layout file in case it could to reproduce?
> 
> My layout https://bugs.kde.org/attachment.cgi?id=117148

with your layout, is reproduced
Comment 7 Michail Vourlakos 2019-01-27 11:56:01 UTC
Git commit 3bfa313cbb8d0f2daf096319470abc33ec080432 by Michail Vourlakos.
Committed on 27/01/2019 at 11:54.
Pushed by mvourlakos into branch 'master'.

fix crash when showing shortcut badges

M  +1    -1    containment/package/contents/ui/applet/ShortcutBadge.qml
M  +1    -1    plasmoid/package/contents/ui/task/IconItem.qml

https://commits.kde.org/latte-dock/3bfa313cbb8d0f2daf096319470abc33ec080432
Comment 8 trmdi 2019-01-27 13:02:19 UTC
Yes, it does not crash anymore.
But now there are two issues:
- shortcut badges are too small. See my screenshot: https://i.imgur.com/EBMigNo.png (Item size = 32px)
- pressing shortcuts does not trigger anything with my layout. It works with your layout.
Comment 9 Michail Vourlakos 2019-01-27 15:16:49 UTC
(In reply to trmdi from comment #8)
> Yes, it does not crash anymore.
> But now there are two issues:
> - shortcut badges are too small. See my screenshot:
> https://i.imgur.com/EBMigNo.png (Item size = 32px)

ok, in last commit I added 24px. as minimum height in order to not get too narrow with no reason

> - pressing shortcuts does not trigger anything with my layout. It works with
> your layout.

fixed, no entries activation works immediately after startup