Flameshot: KDE freezes when copying to clipboard

Created on 18 Mar 2018  Â·  32Comments  Â·  Source: flameshot-org/flameshot

Hi!

First of all, great tool, enjoying using it. I have, however, noticed that KDE freezes for roughly 10-15 seconds after I copy to clipboard (that is: flameshot -c or flameshot gui (and then copy to clipboard option)). It does, however, NOT freeze when I upload to imgur, wait for the 'finished UI', and then select 'copy to clipboard'. I haven't looked into the code at all, but perhaps there's something different going on there?

It's worth mentioning that it's not the entire desktop environment (e.g. I can still browse pages in chrome, chat in Discord, etc.) It's just the system UI (e.g. I can't open settings, open application launchers, switch applications, etc.).

I'd be more than happy to provide more information as needed!

System

Flameshot version

Flameshot v0.5.1-15-g0e81c6b
Compiled with QT 5.10.1

KDE

plasmashell 5.12.3
Qt: 5.10.1
KDE Frameworks: 5.44.0
kf5-config: 1.0

OS + Kernel

```
4.14.27-1-MANJARO

LSB Version: n/a
Distributor ID: ManjaroLinux
Description: Manjaro Linux
Release: 17.1.6
Codename: Hakoila
```

Bug Waiting For Info

Most helpful comment

I found the cause of the issue (at least for me) - when no notification popup is installed, your DE freezes. I noticed Discord messages were freezing me too back when I had this issue.

All 32 comments

I added a fix related to clipboard some weeks ago, it's weird it still happens in the most recent commit. I suppose I'll need to test it in a VM of your system. I use Fedora KDE and I don't experience any problems with the copy to clipboard.

Happens the same to me. Worked fine up until a week ago when I updated it.

I've been testing the commit and it freezes. I managed to solve this saving the file before it was copied to the clipboard: https://github.com/lupoDharkael/flameshot/commit/fff5888152f1e7126b7bdfd7bc9124f544ff5816
but now it freezes anyway.
It looks like a bug somewhere in Plasma, I'll report it.

The bug seems to be in QT itself, I've tried to mitigate it in Flameshot and now I don't experience any freezes. Please, test the master branch and confirm.

It works fine now! :smile:

Great! thanks for the report!

Kudos to you for this program, keep up the good work!

Also confirmed for me, thanks for the effort. I dropped you some money in your PayPal, enjoy a beer on us!

Still happening to me, Flameshot v0.6.0 with Qt 5.11.1. Running on Manjaro OS with KDE

Just wanted to say I'm encountering this issue as well.

$ flameshot -v
Flameshot v0.6.0
Compiled with Qt 5.12.0

$ plasmashell --version
plasmashell 5.14.5

$ uname -a
Linux larch 4.20.6-arch1-1-ARCH #1 SMP PREEMPT Thu Jan 31 08:22:01 UTC 2019 x86_64 GNU/Linux

Same issue, both on plasma and bspwm, could it be SDDM related?

Same on bspwm (but not on Plasma)

It is already running

Maybe you don't have a notification daemon running then, both of those
cause that

On Wed, Nov 20, 2019, 8:09 AM morpheusthewhite notifications@github.com
wrote:

It is already running

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/lupoDharkael/flameshot/issues/170?email_source=notifications&email_token=ACIQTLH6QDGEORMUY3TWQ2TQUUZIBA5CNFSM4EV5HDDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEER5JUQ#issuecomment-555996370,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACIQTLGITQFRMNLF2HHNCU3QUUZIBANCNFSM4EV5HDDA
.

Yes, I was missing a notification daemon.

Thank you so much

Same problem. Please reopen.

Same problem. please reopen.

problem disappeared after logging out.

This bug resurfaced for me today

I had the bug too, I use bspwm

Flameshot v0.8.5
Compiled with Qt 5.15.1

I found the cause of the issue (at least for me) - when no notification popup is installed, your DE freezes. I noticed Discord messages were freezing me too back when I had this issue.

@dginovker you are a legend! thanks.
in arch linux I installed notification-daemon. then

mkdir $XDG_DATA_HOME/dbus-1/services/
echo '
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/notification-daemon-1.0/notification-daemon
' |  tee $XDG_DATA_HOME/dbus-1/services/org.freedesktop.Notifications.service

it works now

@lupoDharkael not sure if you want to reopen with this newfound info ^

I don't think this needs reopened as I do not want to maintain a "notification" build and a "non notification" build. However, I would happily merge a documentation update that helps others realized that a notification service (like dunst) is required.

Would it be possible instead to check if a notification service exists, and if not, no notification is displayed?

Im not sure there is a standard way to check for all the different notification managers.

Im not sure there is a standard way to check for all the different notification managers.

Even if there was, I feel as though this issue should be handled within d-bus, not in client software — I know of a handful of programs now which experience the same crash for the same reason, and I think d-bus is ultimately to blame here

Also every distro that is not DIY bundles a notification manager. I only experienced this issue as an arch user.

not a c dev but could it be async?

if the notification was something like notify-send "copied to clipboard " & it wont block and freeze.

What do the properties of the m_interface look like here when constructed?: https://github.com/flameshot-org/flameshot/blob/dfcc9cb96bf23b108b47f3c54f92b7a266603c5e/src/utils/systemnotification.cpp#L18-L23

Should m_interface->isValid() be checked? To @westofer's point, asyncCallWithArgumentList could also be used here instead which may at least hide the issue: https://github.com/flameshot-org/flameshot/blob/dfcc9cb96bf23b108b47f3c54f92b7a266603c5e/src/utils/systemnotification.cpp#L65

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dajare picture dajare  Â·  4Comments

xstable picture xstable  Â·  3Comments

borgmanJeremy picture borgmanJeremy  Â·  3Comments

bingoIsCoder picture bingoIsCoder  Â·  4Comments

szszoke picture szszoke  Â·  4Comments