MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

Can't open mxl file with zip version 45

Open ChrisAm1224 opened this issue 1 year ago • 4 comments

Issue type

Opening/saving issue

Bug description

Can't open attached mxl file because the zip version is 45

Steps to reproduce

Attempt to open file Composition1.SHY_.mxl.zip (note I had to rename it to zip because of the webform). MuseScore thinks it's a bad format: image Click Yes: image

Screenshots/Screen recordings

No response

MuseScore Version

OS: Windows 10 Version 2009 or later, Arch.: x86_64, MuseScore Studio version (64-bit): 4.3.0-241231433, revision: github-musescore-musescore-5f36e74

Regression

No.

Operating system

Windows 11

Additional context

No response

ChrisAm1224 avatar May 16 '24 09:05 ChrisAm1224

suspicion is that QZipReader doesn't support newer zip formats (zip64). libzip might be a better choice.

ChrisAm1224 avatar May 19 '24 08:05 ChrisAm1224

We don't use QZipReader itself; our zip implementation is in https://github.com/musescore/MuseScore/blob/master/src/framework/global/serialization/internal/zipcontainer.cpp. However, it does look like that code is basically copied from Qt (compare with https://codebrowser.dev/qt5/qtbase/src/gui/text/qzip.cpp.html).

Switching to a different ZIP solution may not be a bad idea. We suspect that this miserable mystery is also caused by errors in the ZIP-related code: #16339

cbjeukendrup avatar May 19 '24 12:05 cbjeukendrup

libzip (https://libzip.org/, https://github.com/nih-at/libzip/) is based on the original zlib library (https://github.com/madler/zlib) and seems fairly stable and mature.

ChrisAm1224 avatar May 19 '24 12:05 ChrisAm1224

Example application miniunz from zlib 1.3.1 properly handled this archive.

irwir avatar May 19 '24 16:05 irwir