Bug 376555 - Error while opening or extracting specific zip file (file type mismatch ?)
Summary: Error while opening or extracting specific zip file (file type mismatch ?)
Status: RESOLVED UPSTREAM
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 16.08.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-16 17:27 UTC by Raf
Modified: 2017-02-17 16:54 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raf 2017-02-16 17:27:57 UTC
Application: ark (16.08.2)

Qt Version: 5.6.1
Frameworks Version: 5.26.0
Operating System: Linux 4.4.46-11-default x86_64
Distribution: "openSUSE Leap 42.2"

-- Information about the crash:
Ark don't want to open or extract specified zip files. The files can be somehow corrupt, however other archives programs on other platforms don't have any problems with them.

You can check the files (it's from US gov agency responsible for air traffic control):
http://aeronav.faa.gov/enroute/03-02-2017/delcb3.zip
http://aeronav.faa.gov/enroute/03-02-2017/delcb1.zip
http://aeronav.faa.gov/enroute/03-02-2017/delcb5.zip
http://aeronav.faa.gov/enroute/03-02-2017/dehcb1.zip

When you try to open with ark you get error with following console output:
ark.kerfuffle: Mimetype for filename extension ( "application/zip" ) did not match mimetype for content ( "application/pdf" ). Using content-based mimetype.
ark.kerfuffle: Could not find a plugin to handle "/home/xxx/xxxxx/delcb3.zip"

The 'file' command gives you back:
delcb3.zip: Zip archive data, at least v2.0 to extract Zip archive data, at least v2.0 to extract


When you try to open it with batch option application crashes with flowing  output/backtrace:

ark.kerfuffle: Mimetype for filename extension ( "application/zip" ) did not match mimetype for content ( "application/pdf" ). Using content-based mimetype.
ark.kerfuffle: Could not find a plugin to handle "/home/xxxx/xxxxx/delcb3.zip"                                                                                  
QObject::connect: Cannot connect (null)::percent(KJob*,ulong) to BatchExtract::forwardProgress(KJob*,ulong)                                                      
QObject::connect: invalid null parameter                                                                                                                         
KCrash: Application 'ark' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0
QSocketNotifier: Invalid socket 8 and type 'Read', disabling...


-- Backtrace:
Application: Ark (ark), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f78bf074880 (LWP 10183))]

Thread 3 (Thread 0x7f78a3df5700 (LWP 10185)):
#0  0x00007f78b6f9e7b9 in g_mutex_lock () from /usr/lib64/libglib-2.0.so.0
#1  0x00007f78b6f5c969 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f78b6f5d230 in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f78b6f5d42c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f78bbb8332b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007f78bbb30fdb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#6  0x00007f78bb96bf1a in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#7  0x00007f78b8fd21d5 in ?? () from /usr/lib64/libQt5DBus.so.5
#8  0x00007f78bb9709e9 in ?? () from /usr/lib64/libQt5Core.so.5
#9  0x00007f78b7691734 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f78bb284d3d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f78ac19b700 (LWP 10184)):
#0  0x00007f78bb27c49d in poll () from /lib64/libc.so.6
#1  0x00007f78b480a3e2 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007f78b480bfcf in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f78ae6f5839 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007f78bb9709e9 in ?? () from /usr/lib64/libQt5Core.so.5
#5  0x00007f78b7691734 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f78bb284d3d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f78bf074880 (LWP 10183)):
[KCrash Handler]
#6  0x00000000004113d0 in ?? ()
#7  0x00007f78bbb69ea6 in ?? () from /usr/lib64/libQt5Core.so.5
#8  0x00007f78bbb5df34 in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#9  0x00007f78bc839e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007f78bc83e49a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007f78bbb32fc5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#12 0x00007f78bbb82c7e in QTimerInfoList::activateTimers() () from /usr/lib64/libQt5Core.so.5
#13 0x00007f78bbb83041 in ?? () from /usr/lib64/libQt5Core.so.5
#14 0x00007f78b6f5d134 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#15 0x00007f78b6f5d388 in ?? () from /usr/lib64/libglib-2.0.so.0
#16 0x00007f78b6f5d42c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#17 0x00007f78bbb8330c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#18 0x00007f78bbb30fdb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#19 0x00007f78bbb38ec6 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#20 0x000000000040d368 in ?? ()
#21 0x00007f78bb1bb6e5 in __libc_start_main () from /lib64/libc.so.6
#22 0x000000000040e0e9 in _start ()

------------------------------------------------------------------

Note: you can successfully extract the archive using unzip. The following error will be displayed in the console:

Archive:  delcb3.zip
  inflating: ENR_CA03.pdf            
  inflating: ENR_CL03.pdf            

note:  didn't find end-of-central-dir signature at end of central dir.
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)
Comment 1 Ragnar Thomsen 2017-02-16 18:39:36 UTC
I can't reproduce the issue. Ark 16.08.3 opens the delcb3.zip archive fine using both cli7z and clizip plugins for me.

What is your version of shared-mime-info?

Can you launch Ark from the command-line using the command:
QT_LOGGING_RULES=ark.*.debug=true ark

and then try to open the archive and provide the output here.
Comment 2 Raf 2017-02-16 19:09:05 UTC
The output from 'QT_LOGGING_RULES=ark.*.debug=true ark':

ark.main: Entering application loop
ark.kerfuffle: Could not find executable "lsar"
ark.part: Attempting to open archive "/home/xxx/delcb3.zip"
ark.kerfuffle: Going to create archive "/home/xxx/delcb3.zip"
ark.kerfuffle: Mimetype for filename extension ( "application/zip" ) did not match mimetype for content ( "application/pdf" ). Using content-based mimetype.
ark.kerfuffle: Could not find executable "lsar"
ark.kerfuffle: Could not find executable "lsar"
ark.kerfuffle: Could not find a plugin to handle "/home/xxx/delcb3.zip"
ark.kerfuffle: Created archive instance with error

------------

ark 16.08.2
shared-mime-info-1.6-2.2.x86_64

This is shared-mime related issue ?
Comment 3 Elvis Angelaccio 2017-02-17 09:39:03 UTC
This should be https://bugs.freedesktop.org/show_bug.cgi?id=96660

Which means you need shared-mime-info 1.7 or newer. Please reopen if you are still affected after upgrading your shared-mime-info package.
Comment 4 Ragnar Thomsen 2017-02-17 16:54:57 UTC
Git commit fc156de869cfbb6540c13b318a88887475e59902 by Ragnar Thomsen.
Committed on 17/02/2017 at 16:52.
Pushed by rthomsen into branch 'master'.

clizip: Add a corrupt archive pattern

Add the pattern
"didn't find end-of-central-dir signature at end of central dir"
to corruptArchivePatterns.

M  +9    -8    plugins/clizipplugin/cliplugin.cpp

https://commits.kde.org/ark/fc156de869cfbb6540c13b318a88887475e59902