Bug 312238 - okular crash when load a malformed epub
Summary: okular crash when load a malformed epub
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.15.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 330330 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-26 20:38 UTC by mercuriete
Modified: 2014-01-25 16:14 UTC (History)
3 users (show)

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


Attachments
New crash information added by DrKonqi (5.37 KB, text/plain)
2013-02-17 00:38 UTC, drarigsevy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mercuriete 2012-12-26 20:38:17 UTC
Application: okular (0.15.3)
KDE Platform Version: 4.9.3
Qt Version: 4.8.3
Operating System: Linux 3.5.0-21-generic i686
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:

open a malformed epub.

1) rename some zipped file:        file.zip  to file.epub 
2) try to open this file with okular
3) okular exit with a segmentation fault signal

i think that is an error from libepub not from okular because in the backtrace says this:

in _ocf_parse_container (ocf=0x9e26868) at /build/buildd/ebook-tools-0.2.1/src/libepub/ocf.c:36

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[KCrash Handler]
#6  0xb5d926b6 in ?? () from /lib/i386-linux-gnu/libc.so.6
#7  0xb200517c in _ocf_parse_container (ocf=0x9e26868) at /build/buildd/ebook-tools-0.2.1/src/libepub/ocf.c:36
#8  0xb200563f in _ocf_parse (epub=0x9e100b8, filename=0x9e0e108 "/home/mercuriete/Descargas/kamasutra/Archivo de texto.epub") at /build/buildd/ebook-tools-0.2.1/src/libepub/ocf.c:236
#9  0xb200458e in epub_open (filename=0x9e0e108 "/home/mercuriete/Descargas/kamasutra/Archivo de texto.epub", debug=3) at /build/buildd/ebook-tools-0.2.1/src/libepub/epub.c:25
#10 0xb1262465 in Epub::EpubDocument::EpubDocument (this=0x9e0dc30, fileName=...) at ../../../generators/epub/epubdocument.cpp:28
#11 0xb126094d in Epub::Converter::convert (this=0x9e0ae90, fileName=...) at ../../../generators/epub/converter.cpp:106
#12 0xb25568a9 in Okular::TextDocumentGenerator::loadDocument (this=0x9a031e8, fileName=..., pagesVector=...) at ../core/textdocumentgenerator.cpp:255
#13 0xb2539bb8 in Okular::DocumentPrivate::openDocumentInternal (this=0x9abf7f8, offer=..., isstdin=isstdin@entry=false, docFile=..., filedata=...) at ../core/document.cpp:766
#14 0xb2542d76 in Okular::Document::openDocument (this=0x9ab0188, docFile=..., url=..., _mime=...) at ../core/document.cpp:1770
#15 0xb25f8be5 in Okular::Part::openFile (this=0x9a46998) at ../part.cpp:1194
#16 0xb778de72 in ?? () from /usr/lib/libkparts.so.4
#17 0xb778e51e in KParts::ReadOnlyPart::openUrl(KUrl const&) () from /usr/lib/libkparts.so.4
#18 0xb25ea09b in openUrl (_url=..., this=0x9a46998) at ../part.cpp:1321
#19 Okular::Part::openUrl (this=0x9a46998, _url=...) at ../part.cpp:1292
#20 0x0804f3c8 in Shell::openUrl (this=this@entry=0x9a135d0, url=...) at ../../shell/shell.cpp:141
#21 0x0804f4f6 in Shell::delayedOpen (this=0x9a135d0) at ../../shell/shell.cpp:120
#22 0xb61ad9aa in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#23 0xb61b1eeb in QObject::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#24 0xb6760f4a in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#25 0xb6b8f05c in QMainWindow::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#26 0xb7351284 in KMainWindow::event(QEvent*) () from /usr/lib/libkdeui.so.5
#27 0xb7398262 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/libkdeui.so.5
#28 0xb670839c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#29 0xb670ce54 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#30 0xb727be91 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#31 0xb619b78e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#32 0xb619f97d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#33 0xb619fc0c in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#34 0xb61cd804 in ?? () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#35 0xb54c09e3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#36 0xb54c0d80 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#37 0xb54c0e61 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#38 0xb61cd981 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#39 0xb67be9aa in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#40 0xb619a26c in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#41 0xb619a561 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#42 0xb619fcba in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#43 0xb6705fc4 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#44 0x0804df96 in main (argc=6, argv=0xbfc83ba4) at ../../shell/main.cpp:85

Reported using DrKonqi
Comment 1 Albert Astals Cid 2012-12-26 21:21:27 UTC
You are right, this is a bug in libepub and it has actually been fixed in 0.2.2, you may want to complain to your distro so they update the version they ship.

Thanks for caring about okular and creating this bug report :-)
Comment 2 drarigsevy 2013-02-17 00:38:38 UTC
Created attachment 77375 [details]
New crash information added by DrKonqi

okular (0.15.4) on KDE Platform 4.9.4 using Qt 4.8.3

- What I was doing when the application crashed:
I have renamed a 'file.html' to 'file.epub' in the Dolphin file manager and then I clicked on icon to open the file in Okular (default setting for opening that file)... that all !

-- Backtrace (Reduced):
#6  0x00007f45f28c2e7d in _ocf_parse_container (ocf=0xc5fb50) at /build/buildd/ebook-tools-0.2.1/src/libepub/ocf.c:36
#7  0x00007f45f28c3268 in _ocf_parse (epub=0x11f1a40, filename=0x11f19c8 "/media/ARCHIVER/Torrent/Livre/Nietzsche, Oeuvres/Le cas Wagner.epub") at /build/buildd/ebook-tools-0.2.1/src/libepub/ocf.c:236
#8  0x00007f45f28c2494 in epub_open (filename=0x11f19c8 "/media/ARCHIVER/Torrent/Livre/Nietzsche, Oeuvres/Le cas Wagner.epub", debug=3) at /build/buildd/ebook-tools-0.2.1/src/libepub/epub.c:25
#9  0x00007f45f2af1544 in Epub::EpubDocument::EpubDocument (this=0x11f62f0, fileName=...) at ../../../generators/epub/epubdocument.cpp:28
#10 0x00007f45f2aefe5f in Epub::Converter::convert (this=0x121b720, fileName=...) at ../../../generators/epub/converter.cpp:106
Comment 3 Albert Astals Cid 2014-01-25 16:14:06 UTC
*** Bug 330330 has been marked as a duplicate of this bug. ***