Bug 282656 - Okular crashed while trying to load an epub file
Summary: Okular crashed while trying to load an epub file
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: EPub backend (show other bugs)
Version: 0.13
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-24 05:42 UTC by Oded Arbel
Modified: 2014-05-08 14:11 UTC (History)
2 users (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 Oded Arbel 2011-09-24 05:42:52 UTC
Application: okular (0.13)
KDE Platform Version: 4.7.00 (4.7.0)
Qt Version: 4.8.0
Operating System: Linux 3.1.0-0.rc6.git0.0.fc16.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:
Trying to open an epub file using Okular. Immediately as Okular started it crashed.

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[KCrash Handler]
#6  0x00007fe44f4ca14c in _zip_name_locate (za=0x2185e40, fname=0x7fe44f6d7014 "mimetype", flags=8, error=0x2185e50) at zip_name_locate.c:65
#7  0x00007fe44f4cbdd0 in zip_stat (za=0x2185e40, fname=<optimized out>, flags=8, st=0x7fff99980440) at zip_stat.c:45
#8  0x00007fe44f6d2c02 in _ocf_get_file (ocf=<optimized out>, filename=0x7fe44f6d7014 "mimetype", fileStr=0x2185b68) at /usr/src/debug/ebook-tools-0.2.0/src/libepub/ocf.c:154
#9  0x00007fe44f6d3053 in _ocf_parse_mimetype (ocf=0x2185b50) at /usr/src/debug/ebook-tools-0.2.0/src/libepub/ocf.c:7
#10 0x00007fe44f6d320b in _ocf_parse (epub=0x21853f0, filename=0x21831e8 "/media/D71E-6110/artofwar.epub") at /usr/src/debug/ebook-tools-0.2.0/src/libepub/ocf.c:230
#11 0x00007fe44f6d2454 in epub_open (filename=0x21831e8 "/media/D71E-6110/artofwar.epub", debug=3) at /usr/src/debug/ebook-tools-0.2.0/src/libepub/epub.c:25
#12 0x00007fe44f8e1634 in Epub::EpubDocument::EpubDocument (this=0x2182100, fileName=...) at /usr/src/debug/okular-4.7.0/generators/epub/epubdocument.cpp:28
#13 0x00007fe44f8dfedf in Epub::Converter::convert (this=0x2182f80, fileName=...) at /usr/src/debug/okular-4.7.0/generators/epub/converter.cpp:106
#14 0x00007fe450ca67f3 in Okular::TextDocumentGenerator::loadDocument (this=<optimized out>, fileName=<optimized out>, pagesVector=...) at /usr/src/debug/okular-4.7.0/core/textdocumentgenerator.cpp:255
#15 0x00007fe450c8c15a in Okular::DocumentPrivate::openDocumentInternal (this=0x1f02870, offer=<optimized out>, isstdin=<optimized out>, docFile=..., filedata=...) at /usr/src/debug/okular-4.7.0/core/document.cpp:674
#16 0x00007fe450c94c37 in Okular::Document::openDocument (this=0x1efc6b0, docFile=..., url=<optimized out>, _mime=<optimized out>) at /usr/src/debug/okular-4.7.0/core/document.cpp:1631
#17 0x00007fe450f3ea96 in Okular::Part::openFile (this=0x1ed4380) at /usr/src/debug/okular-4.7.0/part.cpp:958
#18 0x0000003ad4a277cc in KParts::ReadOnlyPartPrivate::openLocalFile (this=0x1ed4610) at /usr/src/debug/kdelibs-4.7.0/kparts/part.cpp:592
#19 0x0000003ad4a27d84 in KParts::ReadOnlyPart::openUrl (this=0x1ed4380, url=...) at /usr/src/debug/kdelibs-4.7.0/kparts/part.cpp:556
#20 0x00007fe450f30185 in Okular::Part::openUrl (this=0x1ed4380, _url=<optimized out>) at /usr/src/debug/okular-4.7.0/part.cpp:1080
#21 0x0000000000408cb4 in Shell::openUrl (this=0x1ea7c80, url=...) at /usr/src/debug/okular-4.7.0/shell/shell.cpp:134
#22 0x0000003acdf90786 in QObject::event (this=0x1ea7c80, e=<optimized out>) at kernel/qobject.cpp:1194
#23 0x0000003acf817d1b in QWidget::event (this=0x1ea7c80, event=0x20e2280) at kernel/qwidget.cpp:8801
#24 0x0000003acfbe729b in QMainWindow::event (this=0x1ea7c80, event=0x20e2280) at widgets/qmainwindow.cpp:1478
#25 0x0000003ad0f4afe8 in KXmlGuiWindow::event (this=0x1ea7c80, ev=0x20e2280) at /usr/src/debug/kdelibs-4.7.0/kdeui/xmlgui/kxmlguiwindow.cpp:126
#26 0x0000003acf7c7d64 in notify_helper (e=0x20e2280, receiver=0x1ea7c80, this=0x1d514b0) at kernel/qapplication.cpp:4495
#27 QApplicationPrivate::notify_helper (this=0x1d514b0, receiver=0x1ea7c80, e=0x20e2280) at kernel/qapplication.cpp:4467
#28 0x0000003acf7ccbf3 in QApplication::notify (this=0x7fff99982450, receiver=0x1ea7c80, e=0x20e2280) at kernel/qapplication.cpp:4356
#29 0x0000003ad0e500a6 in KApplication::notify (this=0x7fff99982450, receiver=0x1ea7c80, event=0x20e2280) at /usr/src/debug/kdelibs-4.7.0/kdeui/kernel/kapplication.cpp:311
#30 0x0000003acdf778ec in QCoreApplication::notifyInternal (this=0x7fff99982450, receiver=0x1ea7c80, event=0x20e2280) at kernel/qcoreapplication.cpp:853
#31 0x0000003acdf7b37a in sendEvent (event=0x20e2280, receiver=0x1ea7c80) at kernel/qcoreapplication.h:231
#32 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1d314d0) at kernel/qcoreapplication.cpp:1477
#33 0x0000003acdfa6163 in sendPostedEvents () at kernel/qcoreapplication.h:236
#34 postEventSourceDispatch (s=0x1d53380) at kernel/qeventdispatcher_glib.cpp:279
#35 0x0000003acba44b3d in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#36 0x0000003acba45338 in ?? () from /lib64/libglib-2.0.so.0
#37 0x0000003acba4550c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#38 0x0000003acdfa658f in QEventDispatcherGlib::processEvents (this=0x1d32990, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#39 0x0000003acf86a6be in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:207
#40 0x0000003acdf76a22 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#41 0x0000003acdf76c77 in QEventLoop::exec (this=0x7fff999823e0, flags=...) at kernel/qeventloop.cpp:204
#42 0x0000003acdf7b675 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1125
#43 0x0000000000407aa6 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/okular-4.7.0/shell/main.cpp:85

Reported using DrKonqi
Comment 1 Albert Astals Cid 2011-09-24 16:29:06 UTC
Can you attach the file that makes okular crash?
Comment 2 Oded Arbel 2011-09-24 18:27:36 UTC
Actually, now that I really checked it, I see that the file was not downloaded well and is actually 0 bytes in size. If you try to open any epub file which is 0 bytes in size, Okular crashes.

Understandably it can't read the file properly, but I'd still expect some message to the user - if I've known that the problem is that the file is malformed I'd have gone and redownloaded it earlier. 

Opening other epub files (that aren't 0 sized) works fine.
Comment 3 Albert Astals Cid 2011-09-26 00:20:37 UTC
Ely can you have a look? Seems a crash in libepub?
Comment 4 Ely 2011-10-09 12:55:11 UTC
I submitted a bug report to the libzip upstream.
We should retest the bug once they fixed it.
Comment 5 Albert Astals Cid 2011-10-10 09:18:34 UTC
Do they use a bug tracker or did you report the bug to their mailing list?
Comment 6 Ely 2011-10-10 09:22:30 UTC
I reported it to libzip@nih.at as suggested in their README.
Comment 7 Fabio D'Urso 2014-05-08 14:11:40 UTC
I can't reproduce it. Seems like it's been fixed in recent versions.
Thank you for caring about Okular :)