Flameshot v0.8.5
Compiled with Qt 5.15.1
I make screenshot with flameshot, and when I press "copy to clipboard" flameshot stoping for 10-15 secs. I cant use my PC, only mouse cursor work. Logs from console:
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setCompositionMode: Painter not active
QPainter::translate: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrush: Painter not active
Running flameshot, making screenshot, pressing "copy to clipboard"
Flameshot freezing for 10-15 secs
Arch Linux, lxde + i3/openbox
Same problem here, using dwm and arch : 5.9.11-arch2-1
Flameshot v0.8.5
Compiled with Qt 5.15.1
And same output from console.
do you have a notification manager?
before, if notifications were turned on in flmeshot, then it behaved exactly like this
do you have a notification manager?
no
before, if notifications were turned on in flmeshot, then it behaved exactly like this
I disabled notification message from flameshot in his settings, but nothing changed
Update : I think dunst caused the problem.
I uninstalled dunst and now it works as expected.
I have dunst version 1.5.0 and it works nicely with Flameshot. I wonder what the issue can be. The part that @Feresey pointed out is true, that Flameshot expects a notification manager.
I had the same issue on Slackware-Current with Qt 5.15.2 on both Plasma 5 and MATE desktop
@willysr considering that they (KDE Plasma and MATE) both have their own notification backend, I highly doubt that your issue is related to this issue. To confirm, would you please provide the following information:
notify-send "test" in terminal and confirm if you see the notification@mmahmoudian
@borgmanJeremy are we really that dependent on notification? Considering that notification is just a quality-of-life feature and is not part of the main functionality of the software, would it be possible to use a try-catch for notification and prevent Flameshot from crashing when notification daemon/service is not available?
This is happening to me as well. Installed Flameshot via apt command.
$ flameshot -v
Flameshot 0.6.0-11(Debian)
Compiled with Qt 5.11.3
$ uname -srvmo
Linux 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
Using Debian 10.7 with i3wm 4.16.1 (i3 window manager).
No desktop environment chosen from OS installation.
@Arkl1te Your Flameshot is from Aug 17, 2018. The newest version is 0.8.5 which is released in Oct 15, 2020 . Please update your Flameshot.
In case your Ubuntu repository does not have the recent versions, you can uninstall it from apt and install it via snap or flatpak. You can also download the .deb file from the release page and install it via the following command (get the Ubuntu version that corresponds to your Debian):
sudo dpkg -i flameshot-0.8.5-1.ubuntu-20.04.amd64.deb
Now, back to your point, of course we will discuss about dependency to the notification daemon with dev team, but for now, you (and also perhaps @willysr) most probably are lacking a notification daemon. Try installing for example the one I use is "dunst" which is a "customizable and lightweight notification-daemon".
It may be possible to refactor the code to work without a notification manager but it's not high on my priority list.
Primarily because ever larger feature flag doubles the amount of testing I need to do each release and we already are understaffed to add features / close bugs. Additionally this strikes me as something that is useful to 1% of our user base, so I don't want to take on a large amount of work for a small payoff.
@Arkl1te You can also download the .deb file from the release page and install it via the following command (get the Ubuntu version that corresponds to your Debian):
sudo dpkg -i flameshot-0.8.5-1.ubuntu-20.04.amd64.deb
@mmahmoudian I appreciate the info. I tried first as you suggested, the flameshot-0.8.5-1.debian-10.amd64.deb:
$ flameshot --version
Flameshot v0.8.5
Compiled with Qt 5.11.3
Then the buster-backports release. Despite the version, the same freeze keeps happening.
$ flameshot --version
Flameshot v0.8.5-1_bpo10+1(Debian)
Compiled with Qt 5.11.3
Console log is the same for
v0.8.5, andv0.8.5-1_bpo10+1(Debian)as follows:
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setCompositionMode: Painter not active
QPainter::translate: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBrush: Painter not active
@Arkl1te please install a notification daemon as I suggested in my previous comment.
This is not flameshot's fault, but it roots from single dbus name for all of them and there's a race situation about who gets the name. If the winner doesn't get activated in your DE, then flameshot will not be able to use it.
i solved my issue by making changes in mate-notification-daemon so that it became the primary notification daemon instead of being taken by other notification daemon.
seems related:
https://github.com/flameshot-org/flameshot/blob/master/src/utils/screenshotsaver.cpp#L30
// TODO: If data is saved to the clipboard before the notification is sent via
// dbus, the application freezes.