Public bug reported:

The problem

I've installed latest LTS Kubuntu 20.04 (Focal Fossa) with all latest
updates. When I tried to see pictures on my phone connected via USB via
via "mtp" protocol in "Gwenview" application I've found that I can't
open all but the first picture in a directory. Precisely:

1. Open in Gwenview application a remote directory via mtp with small previews;
2. Click on the first picture to see it with full size - it works;
3. Click on any other picture to see it with full size - either black 
rectangular "error loading metadata" info is displayed;
4. Right-click on the picture to open it in Okular or another Gwenview instance 
- it works.

There is no such problem with looking at local directories.

Expected behavior - to be able to see all pictures in full size from
'preview' mode in a single instance of Gwenview.


Investigation and resolution

The bug seems to be fixed in Kubuntu 21.04. And there is no such
erroneous behavior while viewing local pictures.

Firstly I thought it's a bug in Gwenview and started to debug it. But
after debugging I've observed that as long as the application creates
more than one KIO::TransferJob objects as many copies of the same chunks
of data came via each next transfer object. Thus the only first created
transfer object works as expected. That's why I could observe only the
first picture in my phone's directory. And this is the reason to believe
that Gwenview is not the root cause of the behavior.

I've created a trivial console application to get the same file twice
from a phone and got the same erroneous behavior. I've taken a look at
all commits in upstream source code (https://github.com/KDE/kio-extras)
between versions used in 20.04 and 21.04 Kubuntu for mtp module and
found that f4e0183adfd8bf4fd6b9f8e7edea6cb35362c206 change looks related
to my problem. I've got source code for v19.12.3 tag of kio-extras
packages, applied that commit together with
94e7b64325f9e71196a19fb5bc396b9e82f88fc7 and placed resulted mtp.so and
kmtpd.so modules in my system. The bug has gone.


Versions

> lsb_release -rd
Description:    Ubuntu 20.04.2 LTS
Release:        20.04

> LC_ALL=C apt-cache policy kio-extras
kio-extras:
  Installed: 4:19.12.3a-0ubuntu2
  Candidate: 4:19.12.3a-0ubuntu2
  Version table:
 *** 4:19.12.3a-0ubuntu2 500
        500 http://ru.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

> LC_ALL=C apt-cache policy gwenview
gwenview:
  Installed: 4:19.12.3-0ubuntu2
  Candidate: 4:19.12.3-0ubuntu2
  Version table:
 *** 4:19.12.3-0ubuntu2 500
        500 http://ru.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

** Affects: kio-extras (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "a test application source and an output of it"
   
https://bugs.launchpad.net/bugs/1937915/+attachment/5513380/+files/test.tar.bz2

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1937915

Title:
  kio duplicates data got via mtp module

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kio-extras/+bug/1937915/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to