kio duplicates data got via mtp module
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kio-extras (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
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:/
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://
100 /var/lib/
> 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://
100 /var/lib/