Bug 395471 - KCompressionDevice seeks to wrong position
Summary: KCompressionDevice seeks to wrong position
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-karchive
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.46.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-16 02:03 UTC by Theo
Modified: 2022-12-26 05:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Theo 2018-06-16 02:03:46 UTC
Disclaimer: I don't have a full understanding of anything I'm going to talk about, so this bug may as well be a case of wrong usage or a lack of documentation.

There is a problem with kio_iso that is caused by receiving data from KCompressionDevice from the wrong offset position, and which can be fixed by preceding any seek with seek(0):

https://bugs.kde.org/show_bug.cgi?id=372023#c9

As I understand it, KCompressionDevice and its Filter's QFileDevice both inherit a 'pos' and 'devicePos' member variable from QFileDevice. My investigation of the kio_iso bug revealed that these two sets of variables get out of sync, so that the data coming from the QFileDevice does not correspond to the offset position stored in KCompressionDevice's 'pos' variable.

In case this is not a bug in KCompressionDevice, is there some sort of documentation available that explains how one is supposed to avoid a situation like that?
Comment 1 Theo 2018-06-16 23:15:26 UTC
(In reply to Theo from comment #0)
> which can be fixed by
> preceding any seek with seek(0):
> 
> https://bugs.kde.org/show_bug.cgi?id=372023#c9

I am mistaken here. It only fixes one of the two problems described in that bug report. The other problem is fixed by resetting the offset to 0 when opening the device:

https://bugs.kde.org/show_bug.cgi?id=372023#c8
Comment 2 Justin Zobel 2022-11-26 00:13:57 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-12-11 05:07:35 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-12-26 05:21:27 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!