Bug 365931 - Kleopatra only shows Knight Rider Progress bar and no real progress
Summary: Kleopatra only shows Knight Rider Progress bar and no real progress
Status: RESOLVED FIXED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Andre Heinecke
URL: https://bugs.gnupg.org/gnupg/issue2368
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-21 09:39 UTC by Andre Heinecke
Modified: 2016-08-12 16:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Use progress from GpgME (6.19 KB, patch)
2016-07-21 09:40 UTC, Andre Heinecke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Heinecke 2016-07-21 09:39:13 UTC
Older GnuPG versions overflow for files larger 2^31 bytes so this was changed in GnuPG 2.1.14 does not overflow but scales down the progress after more then 1024*1024 bytes are processed so the progress goes down after that. This is nearly unhandable in a stable way as we can't really know when a progress was scaled and when not. Total is always zero unless the job is completed for QGpgME as it internally uses memory based dataproviders and without the patch in https://bugs.gnupg.org/gnupg/issue2368 has no way to handle this that I can see. The patch was rejected upstream so we need another solution for this like an indicator if a progress is scaled so that we can calculate progress based on our internal knowledge of the total size.

Attached is a patch that would fix it on Kleopatra's side once QGpgME provides a decent progress.

Reproducible: Always
Comment 1 Andre Heinecke 2016-07-21 09:40:03 UTC
Created attachment 100227 [details]
Use progress from GpgME
Comment 2 Andre Heinecke 2016-07-21 09:57:55 UTC
Git commit 26bcc69d99a47435a05d056e5aa37c597c815a31 by Andre Heinecke.
Committed on 21/07/2016 at 09:53.
Pushed by aheinecke into branch 'Applications/16.08'.

Workaround crash / assert due to progress overflow

This is not the fix I wanted to have as it still does
not show the real progress. But previously there also
wasn't any progress so this is not a regression and it
fixes a crash.

See BKO 365931 for an outline of a proper fix that actually
shows progress.
Related: bug 319281

M  +17   -4    src/crypto/gui/newresultpage.cpp

http://commits.kde.org/kleopatra/26bcc69d99a47435a05d056e5aa37c597c815a31
Comment 3 Andre Heinecke 2016-08-12 16:05:54 UTC
Git commit fab9fd5f804bdb54db16a1e51b3528b6036d0364 by Andre Heinecke.
Committed on 12/08/2016 at 16:05.
Pushed by aheinecke into branch 'master'.

Fix progress handling (for gnupg >= 2.1.15)

We finally have a solution for progress that works with Qt
data types and how kleopatra passes data to GnuPG. This
requires GpgME 1.7.0 and GnuPG 2.1.15 to work.

This also simplifies progress handling for that case as we
can finally use current and total values and GnuPG no longer
overflows in progress messages since 2.1.14.

M  +1    -1    CMakeLists.txt
M  +4    -17   src/crypto/gui/newresultpage.cpp
M  +14   -11   src/crypto/task.cpp
M  +2    -2    src/crypto/task.h
M  +46   -26   src/crypto/taskcollection.cpp

http://commits.kde.org/kleopatra/fab9fd5f804bdb54db16a1e51b3528b6036d0364