copy/paste still sometimes fails in LibreOffice on mutter 3.36.2

Bug #1879968 reported by Adam Dingle on 2020-05-21
82
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Unknown
mutter (Ubuntu)
Medium
Unassigned

Bug Description

In Ubuntu 19.10 and 20.04 there was a bug that caused copy and paste operations to fail pretty often: the text that was pasted was not the text that was just copied. See the long discussion at bug #1852183. The bug was recently marked closed, since the package mutter - 3.36.2-1ubuntu1~20.04.1 landed in focal-updates and makes the bug occur much less frequently.

Unfortunately the bug still exists, and is not difficult to reproduce. I am running Ubuntu 20.04 and have the new 3.36.2-1ubuntu1~20.04.1 version of mutter. I just opened two LibreOffice Writer windows side by side, and repeatedly selected some text in the left window, copied it, then attempted to paste it into the right window. In my experiment, approximately 1 in every 20 paste operations failed: it did not paste the text that was just copied, but instead the text that was copied before that.

Now, an error rate of 1 in 20 may not seem so bad. On the other hand, if you spend all day writing a document and copy and paste dozens of times during the day, then you may hit this bug multiple times per day (as I have been recently), which is a significant annoyance.

I tested in LibreOffice since that is where I have seen the bug most often, but I have also seen it occur in other applications as well.

Adam Dingle (adam-yorba) on 2020-05-21
description: updated
Launchpad Janitor (janitor) wrote :

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

Changed in mutter (Ubuntu):
status: New → Confirmed
Tim Passingham (tim-8aw3u04umo) wrote :

I tried to reproduce bug #1852183 with just one writer document, and failed to do so after the mutter update. Maybe I didn't try hard enough, but it didn't re-occur after many trials in one writer document.

However, I have now tested copying between two writer documents, and reproduced the same problem. It took me many cope/cut and pastes (well over 20) until it started to happen, and then it started to happen quite frequently, say 1 in 3 or 4.

It seems from several reports that this is a slippery problem, affecting different users in slightly different ways. To me that implies there could be timing and/or load issues affecting the process. However, I am but a simple user, long past my techie days.

I don't understand how the previous report can have been marked as fixed, since Adam Dingle had already said it didn't fully fix the problem. No matter. The bug still exists.

Davide (tarski10) wrote :

I tried libreoffice (calc and writer) on two real machines.
If I use the copy command from the context menu (mouse right click),
it fails once every two (second, fourth, sixth,...).
With the other methods the error rate is approximately 1/20 (the one indicated by Adam)

Tim Passingham (tim-8aw3u04umo) wrote :

Oh dear. Davide, you are right. I habitually use keyboard control keys for cut, copy and paste, and had to try quite hard to get the problem.

Using the context menu (within one writer document) it fails for almost every other try.

Using the main menu it rarely fails, but it did occasionally.

Daniel van Vugt (vanvugt) wrote :

Can someone please also open a new upstream bug?

  https://gitlab.gnome.org/GNOME/mutter/issues

tags: added: focal
summary: - copy/paste still sometimes fails in LibreOffice on Ubuntu 20.04
+ copy/paste still sometimes fails in LibreOffice on mutter 3.36.2
Adam Dingle (adam-yorba) wrote :

Davide, that's a very interesting discovery that every other copy/paste fails when you use the menu caommands. I see that on my machine too. Hopefully that will make it easier to debug the problem, since it is a much more direct way to reproduce the problematic behavior.

(On the other hand, there is no guarantee that this copy/paste failure with menu commands is actually the same bug as the occasional copy/paste failures when you use keyboard shortcuts, since the observed behavior is pretty different.)

Adam Dingle (adam-yorba) wrote :

By the way this bug, like the previous copy/paste issues, is specific to X11. I just logged into Ubuntu 20.04 in a Wayland session and could not reproduce this bug there, either using Ctrl-C/Ctrl-V or the Copy/Paste context menu items.

Daniel van Vugt (vanvugt) wrote :

Please report the bug upstream and mention that you are using mutter 3.36.2:

  https://gitlab.gnome.org/GNOME/mutter/issues

Adam Dingle (adam-yorba) wrote :
Changed in mutter (Ubuntu):
importance: Undecided → Medium
junmeguro (jmaguro) wrote :

Bug reproducing on
 Ubuntu20.4
 Gnome3.36.2
 LibreOfice 7.0.0.0.alpha1

This behavior includes not only copy failures, but also the addition of non-existent whitespace.

https://youtu.be/KdsbAB0n1GU

I now realise a couple of my Calc spreadsheets have been corrupted because of faulty copy and paste. The context menu is definitely the worst offender, but now any regular copy and paste (eg weekly or monthly readings of various things) have to be double-checked.

For me, this is a Major bug. To be honest I can't quite believe it is happening.

Having upgraded to 20.04 rather than installed fresh, I will take this opportunity to switch to Wayland, for a while at least.

Can this get escalated in any way?

Surely such a basic operation as cut/copy and paste should be totally reliable, as it has been on all the systems I have used since 1970. A fundamental inability to do what a user requests is critical, in my view.

I think I will have to ask people in the IT media what they think if this doesn't get sorted very soon.

Daniel van Vugt (vanvugt) wrote :

Ideally please discuss it with the developers at:
https://gitlab.gnome.org/GNOME/mutter/-/issues/1268

Not here.

Daniel, sorry, but as far as I am concerned this is an ubuntu bug. That ubuntu uses, as a fundamental component (not just an add-on), something else is surely an ubuntu problem?

If my car breaks down I don't search for the supplier of a component, I go to the car maker. I do not know if other linux flavours use the same components. I am just an ubuntu user.

Grzegorz Sadowski (sado1sado) wrote :

I wanted to let you know that I am experiencing very similar behaviour on Kubuntu 20.04 after updating from 18.04 to 20.04, and I have my doubts that it's related to Mutter. For now I can confirm that I have an issue on KDE Plasma - to be able to paste (middle mouse click, Ctrl+C/V or Copy/Paste context menu options), I have to copy the same text twice, in one of the ways described below:
1. select text (ie. double click it), then click anywhere to lose focus from it, then select exactly the same text again - then I am able to paste with middle mouse button; or:
2. when text is already selected, I need to hit Ctrl+C twice, then I can paste it with Ctrl+V.
Above is suspiciously close to what Davide mentioned above in comment https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1879968/comments/3 and that's why I decided my problem is probably related.

My suspicion - this may be related to some application I use. On KDE this issue manifests almost right away after logging in now, but there's a short period after logging in, when it doesn't happen yet. Maybe I've got something in autostart that triggers it.

On other environments (Openbox, LXQT and Gnome Shell) I did not experience this problem, however I did test only for a minute. My plan for next few days is to switch to LXQT and wait for the problem to happen again, and let you know.

Luca (samsau-o) wrote :

I am on Ubuntu FF 20.04 using office 2010 via wine-stable 5.0, my system is fully updated. The issue still persists when I am copying and pasting any text within word 2010, with an interesting twist. Copying and pasting works most of the times, but when I copy a portion of text within Word 2010 using ctrl+C then delete it and try paste it, it always fails. As if by deleting the text I just copied from the page I would also delete its copy in the clipboard. When I am in Unity (yeah, I still love and use Unity, even on 20.04) everything works as intended: you copy a portion of the text and can always paste it, no matter what you do to the original text. Hope this helps, this bug is so very annoying.

Changed in mutter:
status: Unknown → New
Marcello Nuccio (marcenuc) wrote :

How can I help to fix this bug?

I can easely reproduce it easely on three differnt computers (one new install, and two upgraded from 19.10).

The only workaround that I have found is to install xubuntu-desktop or lubuntu-desktop. I cannot use "Ubuntu Wayland" because libreoffice becomes sluggish (I can't reproduce it reliably, it seems completely random) and because it has limited remote desktop functionality.

Marcello. I switched to Wayland. For a while now I have noticed Libreoffice, wine applications, and some others being irritatingly slow, and wondered why. It's Wayland! Switching back to the normal ubuntu desktop has bought speed back, but brought the bug back with it.

I can't help wondering if all software has got too complicated these days. One might think something as basic as this was simple to find and fix. Clearly not.

I guess I'll just have to take the performance hit and hope that the almost defunct Wayland has no other major issues. I use copy and paste a lot in spreadsheets as well as in documents. In spreadsheets this has created several errors which took me a long time to find and resolve.

Luca (samsau-o) wrote :

Marcello, your workaround does indeed work because Xu and Lu flavours use a window manager other than Mutter in Gnome. I myself had to revert back to Unity.

I am still really struggling to understand why this is not a major issue amongst ubuntu users. If I use the default interface I get driven crazy several times a day with mainly libreoffice various applications, copying and pasting and getting the wrong data.

Can it be that there are either very few focal desktop users, or libreoffice users, or is it something else more specific to some systems?, or does no one ever copy and paste any more, or do people just not complain? It's so fundamental for me.

I'm still torn between slow wayland and buggy gnome.

wowo (woutvanvucht) wrote :

@Tim Passingham: +1
Me too cannot understand that this annoying bug is classified as "Medium".

It should be "High" because getting wrong data in LibreOffice Applications.

I absolutly agree. This bug is a No-Go for the newest official long term support version. It should have priority high, and someone should be assigned to it!

Marcello Nuccio (marcenuc) wrote :

It's not always easy to check that the pasted text it's the correct one, then this is a data corruption bug. That is why I think this is a critical bug.

Worse, the most affected users of this bug (non-technical ones) are very unlikely to ever report it. For example, I am a programmer and I only discovered this bug when my wife, a non-technical user, reported it to me. She started to see cut and paste problems with Ubuntu 19.04, almost one year ago, but at the same time, I have never had any problem, because, as a programmer, I mostly use different software. My wife has never filled a bug report, as most non-technical users (I think). Then I don't know how to raise awareness of this problem.

Marcello - yes indeed.

For me it is worst with spreadsheets, where I copy a lot of data regularly. For instance when keeping a record of regular measurements, I copy the previous item's formulae each time. I only started to realise that a lot of my sheets were corrupted in early April.

With text I usually realise it is wrong quite quickly. With data and formulae it can be much less obvious.

I was, once, in the IT business, so am not reluctant to get involved with reporting issues, and am also happy to test. Unfortunately I don't know nearly enough about modern systems to be able to debug or fix them (now where's that GA SPC 16/50?).

I fail to understand why this is not being regarded as a critical bug. I hope that spreadsheets on Ubuntu are not ever being used for important stuff, are they?

Ron Houk (houk-ron) wrote :

I agree with the sentiment of others in recent posts. I reported the bug upstream as well and there doesn't seem to be any interest there either. I use Linux and home and at work and I need the clipboard to be working properly. I work at a public library and have been planning on teaching intro to computers classes using Ubuntu, but I don't want to try to explain to beginners the concept of cut and paste while at the same time explaining to them why the OS I'm teaching them on can properly do it.

My solution was to switch to Kubuntu 20.04. It seems to be working fine. I think that's what I'll teach my classes on as well.

erio (eri0) wrote :

This bug is still happening for me when using GNOME, so far the only way to fix this bug is to use Cinnamon or KDE.

Adrian Jones (adrianjones506) wrote :

This bug is still happening .. it really does render this whole package unworkable .. its equivalent to the computer not working at all. At least that way you know your data isn't being corrupted. I'm appalled at the cavalier attitude this bug is being treated... other end itus ... I agree more and more it appears to be an OS issue yet it appears when only using word .. as well as outside word.

Either way some heads need to get together and fix the bug. It used to be when a critical bug like this was encountered then the part at fault was removed.. the bug fixed offline and then tested back in. It seems the modern approach is the old micorshaft approach of let the users test and fix the bug. If its NOT this then the people here should be putting pressure on those whose area it is .. reporting bugs is difficult enough without constantly being shunted around saying its somewhere else you report it .. (only to find you have to install software to prove the bug was happening .. er.. it was happening before I had to install mutter).

I'm also affected by this bug and I think this is a pretty severe bug. I can't understand the 'medium' flag.

Two things I noticed that hopefully help to identify the problem:
A) Every other copy fails for me. After starting the program, the first copy always works. The second copy fails and so on.
B) it only affects specific programs. For my machine, it only effects one program for me (notepad++(wine) installed with snap). In notepad+ every other copy fails in the sense that nothing is copied.

Some specifics on B):
1. I open notepad++ and write '12345' and '67890'
2. I select '12345' and copy it. It works, '12345' is pasted both into notepad++ and any other program like firefox
3. I select '67890' and try to copy. It fails, notepad++ doesn't paste anything. Firefox allows a paste, but '12345' is pasted

Changed in mutter:
status: New → Fix Released
erio (eri0) wrote :

It still fails in mutter 3.36.3 too.

It is not fixed in mutter 3.36.3 using libreoffice. I have checked and o have 3.36.3 installed (and rebooted) and tested again. It failed first time.

It seems to me that there is something very odd going on here. How was the fix tested?

This is second time it has been 'fixed' but users have found that it is still failing. I really do wonder whether the source of the problem has been correctly identified.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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