Summary: | libksane0: Progress bar is stopping while scanning | ||
---|---|---|---|
Product: | [Frameworks and Libraries] libksane | Reporter: | Kai Wb. <curan> |
Component: | general | Assignee: | Kåre Särs <kare.sars> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tuut |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian unstable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | libksane: proposed patch for bug 257982 |
Description
Kai Wb.
2010-11-26 15:41:24 UTC
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. |