Bug 128803 - Copy / pasting cell in Calc sometimes pastes as an image; failure in Mutter's integrated X11 clipboard manager; workaround: use Wayland session
Summary: Copy / pasting cell in Calc sometimes pastes as an image; failure in Mutter's...
Status: CLOSED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 129319 129626 130012 130816 130880 131631 132213 133140 134517 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-14 15:29 UTC by Marcus Tomlinson
Modified: 2022-03-07 20:27 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Tomlinson 2019-11-14 15:29:01 UTC
Description:
Lately on Linux (under an X11 session particularly), it would appear that text copied from a cell in Calc is sometimes stored in the clipboard as a bitmap.

Steps to Reproduce:
1. Open Calc.
2. Type "hello" into a cell.
3. Select the cell.
4. Press Ctrl+C / Ctrl+V over and over.

Actual Results:
Eventually, instead of text, an image containing "hello" will be pasted.

Expected Results:
The text should be copied and pasted as text always.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Marcus Tomlinson 2019-11-14 15:51:19 UTC
It's useful to know that a recent update to mutter is at least partly to blame for this, as I cannot reproduce the issue on versions older than 3.34.

Mutter 3.34 introduced a new clipboard manager: https://www.phoronix.com/scan.php?page=news_item&px=GNOME-3.34-Clipboard-Manager

However, LibreOffice does seem to be doing something strange in its type requests from the clipboard (stand by for a comment from a colleague with more mutter knowledge), so I suspect there may be fault on both ends here.
Comment 2 duceil 2019-11-16 07:53:40 UTC
Can confirm this suspected 'mutter' bad effect on calc 6.3.3 and mutter 3.34.1:

-happen with a calc spreadsheet when trying to copy/paste a formula cell:
 1) from a column's cell, right click to copy it
 2) select the first same column's cell to paste: get a graphic created (kind of image with 4 cells which are draggable and extendable) instead of the normal pasting result.
 3) deleting that graphic objet, then re-copying the original cell, finally the pasting is done as expected.

This has been seen for each copy/paste since calc 6.3.3 upgrade, not prior.

Also note that now LO is unable to load/open an ods file :  after the Nov 11th upgrades; Does not get error from a terminal.
Only get a dialog box telling calc has silently crashed and will then try to recover the ods file: but there is no file listed to recover.
Indeed that ods file load/open as usual with version prior to Focal.
Comment 3 duceil 2019-11-16 07:57:42 UTC
Note that when copy/paste is failing, some more icons are automatically added into the top taskbar, and then are removed when the graphic objet is deleted
Comment 4 Timur 2019-12-15 19:00:10 UTC
*** Bug 129319 has been marked as a duplicate of this bug. ***
Comment 5 Timur 2019-12-26 12:55:04 UTC
*** Bug 129626 has been marked as a duplicate of this bug. ***
Comment 6 Eike Rathke 2020-01-08 17:56:02 UTC
Note that a selection's content is not stored in the clipboard (unless LibreOffice is exited) but upon pasting the target asks for the available formats and picks the best offered, that in this case should be the internal Calc format, which then would be transferred from source to target, but somehow here instead it gets a bitmap/image from the clipboard "manager" (apparently).


(In reply to Marcus Tomlinson from comment #1)
> However, LibreOffice does seem to be doing something strange in its type
> requests from the clipboard (stand by for a comment from a colleague with
> more mutter knowledge), so I suspect there may be fault on both ends here.
So what would that "doing something strange" be?
Comment 7 Eike Rathke 2020-01-08 21:36:18 UTC
Reportedly, if the Clipboard Indicator GNOME Shell Extension was installed, removing that cured the symptom.
Comment 8 Eike Rathke 2020-01-08 22:06:01 UTC
The corresponding Mutter bug is https://gitlab.gnome.org/GNOME/mutter/issues/919
Comment 9 Timur 2020-01-23 07:19:11 UTC Comment hidden (obsolete)
Comment 10 Joe Abraham 2020-01-23 11:41:48 UTC Comment hidden (no-value)
Comment 11 Gerald 2020-01-23 13:28:42 UTC
Now that this bug is confirmed what next? Its is really annoying and making me consider other desktop environments other than GNOME.
Comment 12 Eike Rathke 2020-02-20 17:49:00 UTC
Workaround: login to a Wayland session instead of X11 (or maybe X-Wayland?) session.
Comment 13 Eike Rathke 2020-02-20 17:49:35 UTC
*** Bug 130816 has been marked as a duplicate of this bug. ***
Comment 14 Mike 2020-02-20 18:56:41 UTC
I've found:
1. The initial CTRL-C works fine.
2. Subsequent attempts are OK if one presses CTRL-C twice on the source cell which seems to function as a workaround.
Comment 15 tom1williams 2020-02-27 10:27:55 UTC
I am having the same problem. My work-around was to install XFCE from the Ubuntu repository. As soon as I logged into an XFCE session instead of a GNOME session the problem disappeared completely. I think the people who support mutter have this as a high severity bug.
Comment 16 Timur 2020-02-27 13:59:19 UTC
*** Bug 130880 has been marked as a duplicate of this bug. ***
Comment 17 Eike Rathke 2020-03-27 17:44:24 UTC
*** Bug 131631 has been marked as a duplicate of this bug. ***
Comment 18 Timur 2020-03-28 07:18:52 UTC Comment hidden (obsolete)
Comment 19 Eike Rathke 2020-03-30 13:58:38 UTC
Does it even occur on Windows? If so, that would be a different cause (though highly likely some clipboard destroyer (AKA "manager") involved then as well).
I'm marking this as not-All., i.e. Linux.
Comment 20 Joe Abraham 2020-03-31 08:57:59 UTC Comment hidden (no-value)
Comment 21 Timur 2020-03-31 10:20:18 UTC
(In reply to Eike Rathke from comment #19)
> Does it even occur on Windows?
I see now that all reports are Linux. I wrote that I reproduced once also on Windows, but I cannot repeat now. So fine to stay marked Linux.
Comment 22 Jean-Baptiste Faure 2020-04-27 13:38:22 UTC
If the root cause of this bug is Mutter, why not closing this one as NotOurBug ?

Best regards. JBF
Comment 23 Jean-Baptiste Faure 2020-04-27 13:38:50 UTC
*** Bug 132213 has been marked as a duplicate of this bug. ***
Comment 24 Eike Rathke 2020-04-27 15:47:43 UTC
Indeed, NOTOURBUG.
Comment 25 larrybradley 2020-04-27 23:08:11 UTC
(In reply to Eike Rathke from comment #24)
> Indeed, NOTOURBUG.

Interesting attitude. If you buy a Toyota and the engine goes bad, do you expect Toyota to say, "Sorry, not our problem, they sold us bad engines." Your name is on the product. The product is broken. As a consumer, I look to you to fix it, not some nefarious mix of different manufacturers (each maker of an OS, in this case). Seems like it would be in the best interest of the Document Foundation to at least work with Linux, Windows and Mac developers to find an overarching solution, or separate solutions, for this problem. You simply cannot have a viable product by taking a flyer on these kinds of issues, essentially saying "tough luck, it's not our problem" to the end user. Again, it's your name on the product, and the end user could care less what environment he is in, all he knows that YOUR product is busted. Just my two cents.
Comment 26 Adolfo Jayme Barrientos 2020-04-28 02:01:12 UTC
@Larry, no, that’s not how we roll in open source. Our communities identify problems in each other’s software all the time by forwarding bugs. In this case the problem was addressed in Mutter five months ago: https://gitlab.gnome.org/GNOME/mutter/-/commit/2fbbf657d51f14bdcb75c045637e6ebf4df10063

So the “NOTOURBUG” resolution is correct here.
Comment 27 tom1williams 2020-04-28 06:33:07 UTC
I opened a bug report that was closed as a duplicate of this bug, so I think that this bug is the right place for me to post my comment now. I just want to point out that this problem still exists under Ubuntu 20.04 and Libre Office 6.4.2.2. Ubuntu 20.04 went into production status a few days ago and I did a clean install of it on my system. I use it exactly as it shipped with no customization of any kind. But my situation is worse now because the login screen no longer offers me an "Ubuntu on Wayland" session which was the work around for this bug.
Comment 28 Jean-Baptiste Faure 2020-04-28 07:40:12 UTC
@Larry, Mutter is not part of LibreOffice, it is part of your distribution. 
There is a bug report against Mutter on Ubuntu bug tracker :
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1852183
As reported there, this bug does not only impact LibreOffice. As read in the launchpad bug report, the Mutter bug seems fixed in its 3.36.2 version.

Best regards. JBF
Comment 29 Eike Rathke 2020-04-28 16:12:01 UTC
(In reply to larrybradley from comment #25)
> Interesting attitude. If you buy a Toyota and the engine goes bad, do you
> expect Toyota to say, "Sorry, not our problem, they sold us bad engines."
Interesting approach. I hate car allegories, but the broken part is not even part of the car. So if the bridge you want to ride over is broken you go to the car manufacturer and tell him to make your car fly.

> Your name is on the product. The product is broken.
No, the clipboard manager of the compositor of your window manager of your operating system is broken. That's why there is the Mutter bug linked and this bug here is flagged as notourbug.

Additional findings from the linked Mutter bug are that the problem seems to be (also) related to the Clipboard Indicator GNOME Shell Extension, see already comment 7 here, so you may want to remove that.
Comment 30 Timur 2020-05-18 19:54:15 UTC
*** Bug 130012 has been marked as a duplicate of this bug. ***
Comment 31 Carlos Sevcik 2020-05-18 21:41:34 UTC
All reports suggest that the bug occurs under Linux+GNOME, yet all other Linux+GNOME applications do mouse copy/pastes OK.
Comment 32 Carlos Sevcik 2020-05-18 21:43:35 UTC
Occurs in LO 7.0.0-Alpha too Linux+GNOME
Comment 33 Buovjaga 2020-05-19 06:47:05 UTC
*** Bug 133140 has been marked as a duplicate of this bug. ***
Comment 34 Carlos Sevcik 2020-05-19 11:00:07 UTC
"Workaround: login to a Wayland session instead of X11 (or maybe X-Wayland?) session."

Wayland  is not suppoeted by Ubuntu 20.04 LTS. Probably neither in eny Debian based Linux.
Comment 35 larrybradley 2020-05-19 11:51:58 UTC
In reply to Eike Rathke, Comment 29
Thank you for looking at this issue and for your feedback. I appreciate the work you do and respect your thoughts and opinions.
Comment 36 Carlos Sevcik 2020-05-21 13:31:49 UTC
(In reply to Eike Rathke from comment #29)
> (In reply to larrybradley from comment #25)
> > Interesting attitude. If you buy a Toyota and the engine goes bad, do you
> > expect Toyota to say, "Sorry, not our problem, they sold us bad engines."
> Interesting approach. I hate car allegories, but the broken part is not even
> part of the car. So if the bridge you want to ride over is broken you go to
> the car manufacturer and tell him to make your car fly.
> 
> > Your name is on the product. The product is broken.
> No, the clipboard manager clipboard manager of the compositor of your window manager of your
> operating system is broken. That's why there is the Mutter bug linked and
> this bug here is flagged as notourbug.
> 
> Additional findings from the linked Mutter bug are that the problem seems to
> be (also) related to the Clipboard Indicator GNOME Shell Extension, see
> already comment 7 here, so you may want to remove that.

I may be nave or ignorant, you guess, but 20some programs running on Gnome daily work just fine. so my guess is that they programmed their applications for Gnome and it works. Why LO be an exception?.
Comment 37 Timur 2020-05-22 05:32:26 UTC
Carlos, there is no reason to reply you. 
You seem to be ignorant to read ubuntu bug report and test fix in 20.04.
Comment 38 Carlos Sevcik 2020-05-22 09:00:19 UTC
I certainly ignore many things. Thank you.
Comment 39 Timur 2020-07-22 21:22:39 UTC
*** Bug 134517 has been marked as a duplicate of this bug. ***
Comment 40 Moshpirit 2022-03-05 16:30:26 UTC
This happens to me too but I don't use Mutter. I use Manjaro KDE (with Plasma) https://ask.libreoffice.org/t/lo-detects-ctrl-v-and-ctrl-z-twice/68041
Comment 41 Eike Rathke 2022-03-07 20:27:34 UTC
@albertoma/Moshpirit: Please create a new bug as this one here is specifically about the Mutter situation.