Bug 502995

Summary: KZip cannot open some zip files
Product: [Frameworks and Libraries] frameworks-karchive Reporter: Eloy Cuadra <ecuadra>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: argonel, azhar-momin, ecuadra, kdelibs-bugs-null
Priority: NOR    
Version First Reported In: 6.13.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.14.0
Sentry Crash Report:

Description Eloy Cuadra 2025-04-19 02:10:59 UTC
SUMMARY

KZip enters an endless loop after calling the open(QIODevice::OpenMode mode) method. This only occurs with some zip files created with an older version of KZip. Prior to KF 6.13, they worked fine, even with Qt 6.9. Also, it cannot open some zip files created with KZip from KF 6.13.

STEPS TO REPRODUCE
1. Create a zip file with KZip from KF 6.12 or earlier. It can be opened without any problems.
2. Update to KF 6.13

OBSERVED RESULT
Some zip files (not all) can no longer be opened with KZip. Only with some files, the KZip's open() method never returns and the application enters an endless loop.

EXPECTED RESULT
KF 6.13's Kzip should be able to open any zip file created with earlier versions.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250417
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 Azhar Momin 2025-04-19 14:21:16 UTC
(In reply to Eloy Cuadra from comment #0)
> SUMMARY
> 
> KZip enters an endless loop after calling the open(QIODevice::OpenMode mode)
> method. This only occurs with some zip files created with an older version
> of KZip. Prior to KF 6.13, they worked fine, even with Qt 6.9. Also, it
> cannot open some zip files created with KZip from KF 6.13.
> 
> STEPS TO REPRODUCE
> 1. Create a zip file with KZip from KF 6.12 or earlier. It can be opened
> without any problems.
> 2. Update to KF 6.13
> 
> OBSERVED RESULT
> Some zip files (not all) can no longer be opened with KZip. Only with some
> files, the KZip's open() method never returns and the application enters an
> endless loop.
> 
> EXPECTED RESULT
> KF 6.13's Kzip should be able to open any zip file created with earlier
> versions.
> 
> SOFTWARE/OS VERSIONS
> Operating System: openSUSE Tumbleweed 20250417
> KDE Plasma Version: 6.3.4
> KDE Frameworks Version: 6.13.0
> Qt Version: 6.9.0
> Kernel Version: 6.14.2-1-default (64-bit)
> Graphics Platform: Wayland

These MRs should’ve fixed that:
- https://invent.kde.org/frameworks/karchive/-/merge_requests/111
- https://invent.kde.org/frameworks/karchive/-/merge_requests/116

Can you try building from the master branch and see if the issue still happens? If building isn't an option or it still loops infinitely, could you attach one of the zips that fails?
Comment 2 Eloy Cuadra 2025-04-19 15:40:29 UTC
(In reply to Azhar Momin from comment #1)
> These MRs should’ve fixed that:
> - https://invent.kde.org/frameworks/karchive/-/merge_requests/111
> - https://invent.kde.org/frameworks/karchive/-/merge_requests/116
> 
> Can you try building from the master branch and see if the issue still
> happens? If building isn't an option or it still loops infinitely, could you
> attach one of the zips that fails?

I built KArchive from master branch and it's working fine again with all my zip files. Thanks! I think this bug report can be closed now.