Bug 411657 - Latte dock free when used with some combinations of plasmoids
Summary: Latte dock free when used with some combinations of plasmoids
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Plasma
Component: application (show other bugs)
Version: 0.9.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-06 21:33 UTC by Filipe Azevedo
Modified: 2019-09-08 19:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filipe Azevedo 2019-09-06 21:33:45 UTC
When using some particular combinations of plasmoid with a "(panel) latte dock" latte dock regularly freeze and need to be killed / restarted so it works again.
Also, promoting a dock to panel then removing its latte plasmoid, always lead to freeze, ie a plasmoid latte dock less panel always freeze.


STEPS TO REPRODUCE
1. Create a new user
2. Log in with this user
3. You should arrive on a plasma having a bottom latte dock
4. Create a top panel dock
5. Add 2 or 3 web browser plasmoids
6. Add system tray (or notifications) plasmoid
7. Open the web browser plasmoid popup
8. Use kde shortcut to resize / move windows: Meta+ Up/Left/Top/Bottom
9. Notice after the second shortcut trigger the popup does no longer render correctly
10. Try to use your panel / dock
11. It's not working, it's frozen

OBSERVED RESULT
Latte dock freeze

EXPECTED RESULT
No freeze

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0

ADDITIONAL INFORMATION

Some combinations that works / freeze:
Panel + NO latte + browser = Freeze
Panel + latte + browser = OK
Panel + latte + browser + notifications = Freeze

Output traces from -d --with-window:
23:25:58.740 lattedock(2122/2122) WARNING: QProcess::~QProcess|Latte::UniversalSettings::kwin_metaForwardedToLatte|Latte::GlobalShortcuts::showViews QProcess: Destroyed while process ("kreadconfig5") is still running.

/!\ At this point i have a dead / zombie kreadconfig5 process.

Back trace at the time of the freeze:
#0  0x00007ffff0e1cc12 in ppoll () at /lib/libc.so.6
#1  0x00007ffff1c8e760 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /usr/lib/libQt5Core.so.5
#2  0x00007ffff1bcc92f in QProcessPrivate::waitForFinished(int) () at /usr/lib/libQt5Core.so.5
#3  0x00007ffff1bc2f3d in QProcess::waitForFinished(int) () at /usr/lib/libQt5Core.so.5
#4  0x00007ffff1bc3682 in QProcess::~QProcess() () at /usr/lib/libQt5Core.so.5
#5  0x00000000004f8bad in Latte::UniversalSettings::kwin_metaForwardedToLatte() const ()
#6  0x0000000000506f6b in Latte::GlobalShortcuts::showViews() ()
#7  0x00007ffff1c6a730 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#8  0x00007ffff1c6a730 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#9  0x00007ffff1c759e7 in QTimer::timeout(QTimer::QPrivateSignal) () at /usr/lib/libQt5Core.so.5
#10 0x00007ffff1c6adbb in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#11 0x00007ffff3a8db81 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#12 0x00007ffff3a94aa0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff1c419f9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#14 0x00007ffff1c91ae3 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#15 0x00007ffff1c922bc in idleTimerSourceDispatch(_GSource*, int (*)(void*), void*) () at /usr/lib/libQt5Core.so.5
#16 0x00007fffe852b51e in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#17 0x00007fffe852b788 in  () at /usr/lib/libglib-2.0.so.0
#18 0x00007fffe852b80c in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#19 0x00007ffff1c925d3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#20 0x00007ffff1c406fb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#21 0x00007ffff1c4839e in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#22 0x0000000000471c9c in main ()
Comment 1 Filipe Azevedo 2019-09-06 22:17:17 UTC
As a workaround, disable meta shortcut support from latte dock configure dialog and restart the application hide the issue.
Comment 2 Michail Vourlakos 2019-09-07 05:03:13 UTC
In what distro?
Comment 3 Filipe Azevedo 2019-09-07 07:32:34 UTC
KaOS
Comment 4 Michail Vourlakos 2019-09-07 09:03:35 UTC
1. Send me a layout that creates issues with you in order to try to reproduce
2. Lately freezes have shown to Arch and influence all plasma Qt apps in Multiple cases. The issue came from ostree, you can try to check that out to your system also
Comment 5 Michail Vourlakos 2019-09-07 09:03:43 UTC
1. Send me a layout that creates issues with you in order to try to reproduce
2. Lately freezes have shown to Arch and influence all plasma Qt apps in Multiple cases. The issue came from ostree, you can try to check that out to your system also
Comment 6 Rylsm 2019-09-07 16:24:07 UTC
Since KaOS is based on Arch Linux and use their packages then it's clearly caused by the latest ostree (2019.3-2), you can remove it but it will remove flatpak so make sure you don't have any flatpak package installed or you can downgrade it with downgrade from AUR.
Comment 7 Filipe Azevedo 2019-09-07 17:21:01 UTC
KaOS is not ARCH/AUR based at all.
While it share something in common (pacman package manager), it is a from scratch distribution and it has its very own packages.
Also from the output log, it would looks like a wrongly handled destroyed process, from that i can hardly see a relation to ostree.
Using flatpak, i'm not able to delete this file.
Comment 8 Michail Vourlakos 2019-09-07 17:54:56 UTC
Hm....

If you disable in Latte Global Preferences option, "Press and Hold ⌘ to show shortcuts badges"

does it still occur?
Comment 9 Rylsm 2019-09-07 18:25:07 UTC
Well it doesn't stop you from using AUR or install any Arch Linux packages. You can install software from AUR from KaOS since it's using the same build mechanism as Arch.
KaOS is like Manjaro but far more conservative and only focuses on KDE Plasma DE. 
I have the same issue and same debug output on Manjaro. Downgrading ostree is the only solution for  flatpak user.  If you can build your own PKGBUILD you can build your own patched version of ostree from this PR on ostree Github: https://github.com/ostreedev/ostree/pull/1917
Comment 10 Filipe Azevedo 2019-09-07 19:00:17 UTC
(In reply to Michail Vourlakos from comment #8)
> Hm....
> 
> If you disable in Latte Global Preferences option, "Press and Hold ⌘ to show
> shortcuts badges"
> 
> does it still occur?

As say my second comment:

As a workaround, disable meta shortcut support from latte dock configure dialog and restart the application hide the issue.

I can not check if the badge stuff is still enabled, the config file only show "metaPressAndHoldEnabled=false".
The reason why i can not check is that it seems it exist another bug that prevent the config dialog to be shown if a latte dock in panel mode does not contains the latte tasks plasmoid.
Comment 11 Filipe Azevedo 2019-09-07 19:03:06 UTC
(In reply to Rylsm from comment #9)
> Well it doesn't stop you from using AUR or install any Arch Linux packages.
> You can install software from AUR from KaOS since it's using the same build
> mechanism as Arch.
> KaOS is like Manjaro but far more conservative and only focuses on KDE
> Plasma DE. 
> I have the same issue and same debug output on Manjaro. Downgrading ostree
> is the only solution for  flatpak user.  If you can build your own PKGBUILD
> you can build your own patched version of ostree from this PR on ostree
> Github: https://github.com/ostreedev/ostree/pull/1917

I can now see the relation to ostree ;) Thanks for the link.
I will share it to the KaOS team.
Comment 12 Michail Vourlakos 2019-09-07 20:01:08 UTC
I can also try to make that codepath much lighter but I would prefer if someone could test first that patch because in my system I do not have that issue.
Comment 13 Michail Vourlakos 2019-09-07 21:09:08 UTC
Git commit 7cfcd8451122b8c990278375406fe9fde06accbe by Michail Vourlakos.
Committed on 07/09/2019 at 20:52.
Pushed by mvourlakos into branch 'v0.9'.

track kwinrc file only on changes

--instead of reading the kwin values all the time
when needed from user actions we now read them
only on startup and when the kwinrc file was
updated/changed
FIXED-IN:0.9.3

M  +6    -25   app/layout/centrallayout.cpp
M  +2    -2    app/settings/settingsdialog.cpp
M  +65   -24   app/settings/universalsettings.cpp
M  +11   -6    app/settings/universalsettings.h
M  +4    -4    app/shortcuts/globalshortcuts.cpp

https://commits.kde.org/latte-dock/7cfcd8451122b8c990278375406fe9fde06accbe
Comment 14 Michail Vourlakos 2019-09-07 21:10:06 UTC
Git commit 1a49238d5765a97854db3d683b286a7022bb1fc4 by Michail Vourlakos.
Committed on 07/09/2019 at 21:09.
Pushed by mvourlakos into branch 'master'.

track kwinrc file only on changes

--instead of reading the kwin values all the time
when needed from user actions we now read them
only on startup and when the kwinrc file was
updated/changed
FIXED-IN:0.9.3

M  +6    -25   app/layout/centrallayout.cpp
M  +2    -2    app/settings/settingsdialog.cpp
M  +65   -24   app/settings/universalsettings.cpp
M  +11   -6    app/settings/universalsettings.h
M  +4    -4    app/shortcuts/globalshortcuts.cpp

https://commits.kde.org/latte-dock/1a49238d5765a97854db3d683b286a7022bb1fc4
Comment 15 Filipe Azevedo 2019-09-08 19:41:29 UTC
(In reply to Michail Vourlakos from comment #13)
> Git commit 7cfcd8451122b8c990278375406fe9fde06accbe by Michail Vourlakos.
> Committed on 07/09/2019 at 20:52.
> Pushed by mvourlakos into branch 'v0.9'.
> 
> track kwinrc file only on changes
> 
> --instead of reading the kwin values all the time
> when needed from user actions we now read them
> only on startup and when the kwinrc file was
> updated/changed
> FIXED-IN:0.9.3
> 
> M  +6    -25   app/layout/centrallayout.cpp
> M  +2    -2    app/settings/settingsdialog.cpp
> M  +65   -24   app/settings/universalsettings.cpp
> M  +11   -6    app/settings/universalsettings.h
> M  +4    -4    app/shortcuts/globalshortcuts.cpp
> 
> https://commits.kde.org/latte-dock/7cfcd8451122b8c990278375406fe9fde06accbe

Thanks !
Comment 16 Filipe Azevedo 2019-09-08 19:44:14 UTC
(In reply to Rylsm from comment #9)
> Well it doesn't stop you from using AUR or install any Arch Linux packages.
> You can install software from AUR from KaOS since it's using the same build
> mechanism as Arch.
> KaOS is like Manjaro but far more conservative and only focuses on KDE
> Plasma DE. 
> I have the same issue and same debug output on Manjaro. Downgrading ostree
> is the only solution for  flatpak user.  If you can build your own PKGBUILD
> you can build your own patched version of ostree from this PR on ostree
> Github: https://github.com/ostreedev/ostree/pull/1917

It in fact does (stop me using those packages), Arch / AUR packages are absolutely not compatible with KaOS. Thanks for ostree hint.