Bug Hunting Session
Bug 82984 - FILEOPEN: Error opening XLSX file in zip64 format
Summary: FILEOPEN: Error opening XLSX file in zip64 format
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: filter:xlsx
Depends on:
Blocks: XLSX File-Opening
  Show dependency treegraph
 
Reported: 2014-08-23 08:36 UTC by William Mann
Modified: 2019-02-23 17:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
File in zip64 format which causes load error. (4.60 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-08-23 08:36 UTC, William Mann
Details
Modified (rezipped) file that opens correctly. (9.84 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-08-23 08:38 UTC, William Mann
Details
XLSX without ZIP64 (12.34 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-11-30 06:22 UTC, Andreas Reichel
Details
XLSX with ZIP64 (12.88 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-11-30 06:24 UTC, Andreas Reichel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William Mann 2014-08-23 08:36:35 UTC
Created attachment 105137 [details]
File in zip64 format which causes load error.

Problem description: 

When attempting to open an XLSX file compressed using the ZIP64 format LO gives an error stating the file is damaged. After unzipping the file and then re-compressing LO is then able to open the file. The ZIP version in the header of the original file is 0x2D while the files produced by LO contain 0x14 as the version.

Steps to reproduce:
1. Attempt to load an XLSX file in ZIP64 format.

Current behavior:

Error stating that file is damaged.

Expected behavior:

Loading the file.

              
Operating System: Linux (Other)
Version: 4.3.0.4 release
Comment 1 William Mann 2014-08-23 08:38:02 UTC
Created attachment 105138 [details]
Modified (rezipped) file that opens correctly.
Comment 2 Owen Genat (retired) 2014-08-23 13:49:24 UTC
(In reply to comment #0)
> Current behavior:
> Error stating that file is damaged.

Confirmed under GNU/Linux using:

- v4.3.0.4 Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0
- v4.4.0.0.alpha0+ Build ID: e379401618268ed7f7f5885a36b90e1f4f6cd4af TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-08-18_05:51:03

Status set to NEW.
Comment 3 Aigars Mahinovs 2015-02-09 15:17:50 UTC
Confirmed that this also affects files created with https://xlsxwriter.readthedocs.org/ if use_zip64 option is used (which is mandatory for large files).
Comment 4 William Mann 2015-08-14 09:49:13 UTC
This bug is also confirmed on version:

Version: 5.0.0.5 
Build ID: 00m0(Build:5)

running on Linux Mint 17.2. Is zip going to be updated anytime soon? I'm running into a lot of files that have been compressed with zip64 and unzipping and rezipping is not really an end-user kind of thing. This is one of those "little" things that keep some local governments (I work for a municipality) from switching completely from a Microsoft-laden environment.
Comment 5 QA Administrators 2016-09-20 10:25:40 UTC Comment hidden (obsolete)
Comment 6 William Mann 2016-09-20 13:18:43 UTC
As requested, I've confirmed that this bug still exists and it's behaviour is the same as reported originally. I verified using LO 5.2.1.2 running on a Kubuntu 16.04  64-bit system (linux kernel version is 4.4.0-38-generic).
Comment 7 Xisco Faulí 2017-09-29 08:48:07 UTC Comment hidden (obsolete)
Comment 8 Andreas Reichel 2018-11-30 06:22:16 UTC
Created attachment 147159 [details]
XLSX without ZIP64

This file can be read in LibreOffice and Gnumeric.
Comment 9 Andreas Reichel 2018-11-30 06:24:05 UTC
Created attachment 147160 [details]
XLSX with ZIP64

This file can be read in Gnumeric, but fails in LibreOffice.
Comment 10 Andreas Reichel 2018-11-30 06:26:53 UTC
This bug is still valid in LibreOffice Version: 6.1.3.2 (CPU threads: 16; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); Calc: threaded).

I have created 2 files with the same content using Apache POI. One file is ZIP64 and can be read by Gnumeric, but not LibreOffice. The other file has been written without ZIP64 and can be read by LibreOffice 6.1.3.2
Comment 11 Krzysztof Rzymkowski 2019-02-23 17:37:25 UTC
Looks like LibreOffice (Version: 6.0.7.3, Build ID: 1:6.0.7-0ubuntu0.18.04.2) has a hard requirement on just the zip version field. But only in Central directory's "version needed to extract" (see: https://en.wikipedia.org/wiki/Zip_(file_format)#Central_directory_file_header). Looks like this version needs to less of equal to 30. Other version fields can be 45: Local file header's version and "version made by" in central directory. 

For a Excel and LibreOffice compatible zip64  compressor implementation see: https://github.com/rzymek/opczip/blob/master/src/main/java/com/github/rzymek/opczip/Zip64Impl.java