Bug 512199 - *.kim export file has a size limit of ~4GB
Summary: *.kim export file has a size limit of ~4GB
Status: CONFIRMED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: Import/Export (other bugs)
Version First Reported In: GIT master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-16 16:28 UTC by Andreas Schleth
Modified: 2025-12-30 02:55 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schleth 2025-11-16 16:28:33 UTC
SUMMARY
When exporting with images inside the kim file, the file may get bigger than 4GB (esp. if there are vidos among the data). These files cannot be imported or opened as zip files (after renaming).

STEPS TO REPRODUCE
1. Export a lot of media files with the option "include in kim file"
2. Try to import this file into another database

OBSERVED RESULT
kim file cannot be opened

EXPECTED RESULT
kim file should be opened normally

SOFTWARE/OS VERSIONS
KPhotoAlbum: v6.1.0-14-g3705a5703
KDE Frameworks: 6.17.0
Qt: Using 6.8.2 and built against 6.8.2
TUXEDO OS (Xcb)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.14.0-115036-tuxedo

ADDITIONAL INFORMATION
The size limit should be made transparent on export or circumvented by using another zip library that does not have this limitation.
Comment 1 Randall Rude 2025-12-05 18:28:54 UTC
I exported an personal folder with 5.4G of images and videos.

$ unzip -t 2017.kim
Archive:  2017.kim
warning [2017.kim]:  4294967296 extra bytes at beginning or within zipfile
  (attempting to process anyway)
file #1:  bad zipfile offset (local header sig):  4294967296
  (attempting to re-compensate)
    testing: Images/imgp0465.mov      OK
error: not enough memory for bomb detection
At least one error was detected in 2017.kim.
$ 7z -t 2017.kim
...
WARNING = 32-bit overflow in headers
...
Comment 2 Randall Rude 2025-12-05 20:58:30 UTC
Interestingly, my command-line zip (from Info-Zip) is built with LARGE_FILE_SUPPORT and can create a valid zip file of the same folder.
$ unzip -qt images/2017.zip                                                                                                 
No errors detected in compressed data of images/2017.zip.
$ echo $?                                                                                                                   
0
$ ls -l images/2017.zip                                                                                                     
-rw-rw-r-- 1 me me 5686177599 Dec  5 12:18 images/2017.zip

So this is a limitation of KZip.
Comment 3 Bug Janitor Service 2025-12-30 02:55:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/kphotoalbum/-/merge_requests/61