1920x1080 screenshot hangs & fails on clipboard insert (GIMP&lowriter)

Bug #1655398 reported by David Ayers
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Xfce4 Settings
Fix Released
Medium
xfce4-settings (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This is Xubuntu 16.04 with xfce4-screenshooter 1.8.2-2

We first noticed this using Xubuntu while creating multiple screenshots with "Print" and inserting them into the LibreOffice document.

open a new LibreOffice Writer document
press "Print"
choose save to clipboard
use context menu in LibreOffice to insert screenshot into document
edit document by simply adding 1 as a counter after the screenshot
press "Print" again
choose save to clipboard
use context menu in LibreOffice to insert screenshot into document
edit document by simply adding 2 as a counter after the screenshot
repeat until either the insert hangs an fails (for us it happened on the 3-8 iteration)

With a resolution of 1920x1080 we can insert about 6-7 full screen screenshots before the insert hangs for about ~30 seconds without inserting any contents. Yet editing may be resumed after words. We can also start LibreOffice Calc and attempt an insert and it would report the failure that it could not insert the image.

We can also:
start a fresh GIMP instead
press "print"
Choose File->Create->From Clipboard
here we expect the insertion of the screenshot yet instead:
wait for the ~30 second hang
have GIMP report there that it could not retrieve image Data
(If you start with GIMP it may work for the first few screenshots until it hangs and fails.)

Since this is reproducible with LO and GIMP we are assuming that the issue is with xfce-screenshooter.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: xfce4-screenshooter 1.8.2-2
ProcVersionSignature: Ubuntu 4.4.0-57.78-generic 4.4.35
Uname: Linux 4.4.0-57-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.4
Architecture: amd64
CurrentDesktop: XFCE
Date: Tue Jan 10 17:14:56 2017
InstallationDate: Installed on 2016-12-12 (29 days ago)
InstallationMedia: Xubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: xfce4-screenshooter
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
David Ayers (ayers) wrote :
Revision history for this message
David Ayers (ayers) wrote :
Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

There are some bugs reported to xfce4-screenshooter about copy to clipboard not working for large resolutions:
https://bugzilla.xfce.org/show_bug.cgi?id=13342
https://bugzilla.xfce.org/show_bug.cgi?id=13395
https://bugzilla.xfce.org/show_bug.cgi?id=10426
https://bugzilla.xfce.org/show_bug.cgi?id=12704

gnome-screenshot is also affected if started with -c flag or in interactive mode if you press the copy to clipboard button then close the app before pasting.
At first I thought it was something related to gtk_clipboard_set_image, but this problem doesn't happen when running /usr/lib/gnome-settings-daemon/gsd-clipboard instead of xfsettingsd.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4-screenshooter (Ubuntu):
status: New → Confirmed
Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Apparently it is a bug in xfsettingsd (xfce4-settings):

https://bugzilla.xfce.org/show_bug.cgi?id=13537

affects: xfce4-screenshooter (Ubuntu) → xfce4-settings
Changed in xfce4-settings:
importance: Undecided → Unknown
status: Confirmed → Unknown
Revision history for this message
In , Kristiana2000 (kristiana2000) wrote :

This issue doesnt seem to be limited to just images but generally very large buffers. Copying some very large pieces of text data fails as well.

I looked through the gnome clipboard and xfce source. Unsure which one of the two is the fork, but they obviously share the same codebase. I suggest the changes from gnome-settings-daemon get picked into the xfsettingsd clipboardmanager.

Changed in xfce4-settings:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Since you read both codebases, are you able to identify what could be cause and perhaps provide a patch?

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1655398

tags: added: iso-testing
Revision history for this message
In , Kristiana2000 (kristiana2000) wrote :

(In reply to Andre Miranda from comment #2)
> Since you read both codebases, are you able to identify what could be cause
> and perhaps provide a patch?

I don't see a cause at first glance. Will need to start testing things out and that's probably outside my field of expertise.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4-settings (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Gitbot (gitbot) wrote :

Andre Miranda referenced this bugreport in commit d7ba62f33965e5ba0601fdb7ee13def9c6e4f1bf

Fix incremental sending from the clipboard manager (Bug #13537)

https://git.xfce.org/xfce/xfce4-settings/commit?id=d7ba62f33965e5ba0601fdb7ee13def9c6e4f1bf

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

Luckily gsd-clipboard code didn't change much since 2011, so finding the fix for this was much easier than I thought.

Revision history for this message
In , Lockywolf (lockywolf) wrote :

I'll try to test it today-tomorrow.

Changed in xfce4-settings:
status: Confirmed → Fix Released
Revision history for this message
In , Lockywolf (lockywolf) wrote :

For some reason I can't reproduce it now. Old versions of xfce4-settings and xfce4-screenshooter work just fine.

The only (but huge!) change I made in these two days -- I have changed my root fs from btrfs to ext4.
"After" doesn't mean "because of", but this does add to my suspicion towards btrfs, since I had quite a few mysterious glitches on it.

If I ever see this issue again, I'll try to compare these versions.

Revision history for this message
In , David Ayers (ayers) wrote :

I could also only reproduce this with screen shots taken with a sufficiently high resolution aka buffer.

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

(In reply to David Ayers from comment #8)
> I could also only reproduce this with screen shots taken with a sufficiently
> high resolution aka buffer.

Anything larger than 1920x1080 is enough to reproduce this bug, for instance a laptop connected to an external display.

Revision history for this message
In , Kristiana2000 (kristiana2000) wrote :

Happens to me on 1366x768 resolution screenshots, as well as images copied directly from various programs (chromium/firefox right click copy; gimp ctrl+c copy)
Maybe Xorg's max buffer sizes are dependent on memory size?

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

(In reply to Kristian Angelov from comment #10)
> Happens to me on 1366x768 resolution screenshots, as well as images copied
> directly from various programs (chromium/firefox right click copy; gimp
> ctrl+c copy)
> Maybe Xorg's max buffer sizes are dependent on memory size?

The fix is already in git master, did you try it?

Revision history for this message
In , ondondil (ondondil) wrote :

I could reliably trigger the bug in Xubuntu Disco Dingo (xfce4-settings 4.13.4). After installing daily build of xfce4-settings from xubuntu-dev PPA it seems that the bug is gone. Looks like the fix worked. Thanks!

Revision history for this message
In , Andreldm-2 (andreldm-2) wrote :

(In reply to ondondil from comment #12)
> I could reliably trigger the bug in Xubuntu Disco Dingo (xfce4-settings
> 4.13.4). After installing daily build of xfce4-settings from xubuntu-dev PPA
> it seems that the bug is gone. Looks like the fix worked. Thanks!

You're welcome, thanks for the feedback.

Revision history for this message
Revery (glajchs) wrote :

I've been seeing this bug for many months (maybe years). After compiling from source and relaunching xfsettingsd, the bug appears to be fixed! I'll try it out over the next few days to make sure it's a reliable fix.

Can you backport this one? I'm using xenial and manually applying the patch and building worked. If not maybe I'll try to see if I can figure out how to make a PPA for it.

The way I've been reproducing is I have a keyboard shortcut to take section of the screen screenshots (drap the box) and have it copy to clipboard automatically. (xfce4-screenshooter -r -c). When doing this, if the boxed area was bigger than about...let's say 400x400, upon pasting it was freeze the program it's pasting into for 5ish seconds, and then not actually paste. This seemed intermittent, but most of the time it was an issue (very very occasionally, big screen sections would work).

Revision history for this message
Richard Elkins (texadactyl) wrote :

It fails when pasting the clipboard contents into libreoffice Writer too.
Steps to reproduce:

* Open the attached libreoffice Writer document (texadactyl.odt).
* In your favorite browser, go to URL https://www.coursera.org/specializations/gis-mapping-spatial-analysis
* Launch/invoke the xfce4-screenshooter app.
* Scroll down a bit.
* Snapshot the region of the whole image (3 people) to the right of "Take Courses" in the web page.
* Save the snapshot to the clipboard (not as a normal local disk file).
* Switch to the Libreoffice Writer window.
* Paste the clipboard contents into the open document.
* You should see spinning for around 1 minute before something gives up.

If I save the same snapshot to a local disk file and subsequently insert the image into the Writer document, this works fine without an issue.

Revision history for this message
Richard Elkins (texadactyl) wrote :

I should add that I first reported this bug with the Libreoffice team (https://bugs.documentfoundation.org/show_bug.cgi?id=125785). Following these steps, 2 responders stated that they were unable to reproduce this anomaly in other desktop environments.

Revision history for this message
Torrey Woodhouse (torreydale) wrote :

Affects me, too. I'm using Linux Lite 4.6. Been seeing the problem since October 2016. I use the Select a region option. Then I select Copy to clipboard, but I cannot paste the result anywhere.

Revision history for this message
Sean Davis (bluesabre) wrote :

Are you still experiencing this issue with a currently supported release (focal, impish, or jammy)?

Revision history for this message
Sean Davis (bluesabre) wrote :

Disregard. Bug is fixed upstream!

Changed in xfce4-settings (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.