<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>512199</bug_id>
          
          <creation_ts>2025-11-16 16:28:33 +0000</creation_ts>
          <short_desc>*.kim export file has a size limit of ~4GB</short_desc>
          <delta_ts>2026-02-15 17:23:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kphotoalbum</product>
          <component>Import/Export</component>
          <version>GIT master</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Schleth">schleth_es</reporter>
          <assigned_to name="KPhotoAlbum Bugs">kphotoalbum-bugs-null</assigned_to>
          <cc>johannes</cc>
    
    <cc>rsquared42</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2470698</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Schleth">schleth_es</who>
    <bug_when>2025-11-16 16:28:33 +0000</bug_when>
    <thetext>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 &quot;include in kim file&quot;
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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2474712</commentid>
    <comment_count>1</comment_count>
    <who name="Randall Rude">rsquared42</who>
    <bug_when>2025-12-05 18:28:54 +0000</bug_when>
    <thetext>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
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2474739</commentid>
    <comment_count>2</comment_count>
    <who name="Randall Rude">rsquared42</who>
    <bug_when>2025-12-05 20:58:30 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2480453</commentid>
    <comment_count>3</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2025-12-30 02:55:50 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/graphics/kphotoalbum/-/merge_requests/61</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2481498</commentid>
    <comment_count>4</comment_count>
    <who name="Randall Rude">rsquared42</who>
    <bug_when>2026-01-03 17:45:07 +0000</bug_when>
    <thetext>Created upstream bug 514177.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2494856</commentid>
    <comment_count>5</comment_count>
    <who name="Johannes Zarl-Zierl">johannes</who>
    <bug_when>2026-02-15 17:23:00 +0000</bug_when>
    <thetext>Until there is an upstream resolution, kphotoalbum mitigates the bug by not allowing .kim files over 4GB:
https://invent.kde.org/graphics/kphotoalbum/-/commit/bd21e0a672e67d96cf23a43232375e532a563d39</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>