Version: unspecified (using KDE 4.4.5) OS: Linux As the Debian maintainer for Skanlite I got the following report, but as you (Kâre) agreed by e-mail, this is a libksane bug, therefore I file this against libksane. Original Debian bug report (#601513): > While scanning, the progress bar is every time stops at about the half of the > process, but the scanning is successful. > Tried with a HP PhotoSmart 5383 Reproducible: Always Downstream bug report (Debian): http://bugs.debian.org/601513
Created attachment 68801 [details] libksane: proposed patch for bug 257982
I can reproduce this for scanning with resulotions of 600 dpi and higher in color mode. I think it is an integer overflow in the functions KSanePreviewThread::scanProgress() and KSaneScandThread::scanProgress(): "return (int)((bytesRead * 100)/m_dataSize);" The attached patch changes the datatype of bytesRead and m_dataSize to qint64. I think this solves the bug and on the other hand removes the limitation of 2gb maximum size for scanned images.
Please apply the patch if you want/can :)
Git commit ed09f4ca7224b5a79147de2a18ac9af3fb1d1d6a by Kåre Särs. Committed on 15/02/2012 at 21:19. Pushed by sars into branch 'origin/KDE/4.8'. Fix wrong scan progress indication while scanning big images. M +1 -1 libksane/ksane_preview_thread.cpp M +26 -27 libksane/ksane_scan_thread.cpp http://commits.kde.org/libksane/ed09f4ca7224b5a79147de2a18ac9af3fb1d1d6a
The commit fixes the scan progress for scans that are over 20 MB. Strange that I have not seen this before... Unfortunately the 2GB limit on scans can not be fixed on 32bit systems as QByteArray has that limit.