Bug 210234

Summary: Okular crashed opening chm full of nulls
Product: [Applications] okular Reporter: NeilBryant <neil.bryant>
Component: CHM backendAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: fistful of zeroes

Description NeilBryant 2009-10-11 20:47:10 UTC
Application that crashed: okular
Version of the application: 0.9.1
KDE Version: 4.3.1 (KDE 4.3.1)
Qt Version: 4.5.2
Operating System: Linux 2.6.30.8-64.fc11.x86_64 x86_64
Distribution: "Fedora release 11 (Leonidas)"

What I was doing when the application crashed:
Double-clicked a chm, and Okular choked trying to open it. Looked at the file in hex, and it's 1.5MB of nulls (I think it was a torrent place-holder)

 -- Backtrace:
Application: Okular (okular), signal: Segmentation fault
[KCrash Handler]
#5  0x00007fa41d91ec47 in chm_enumerate () from /usr/lib64/libchm.so.0
#6  0x00007fa41db2b623 in LCHMFileImpl::enumerateFiles (this=0xe77150, files=0x7fff512edbf0) at /usr/src/debug/kdegraphics-4.3.1/okular/generators/chm/lib/libchmfileimpl.cpp:1175
#7  0x00007fa41db3e6c6 in CHMGenerator::loadDocument (this=0xe837a0, fileName=<value optimized out>, pagesVector=<value optimized out>)
    at /usr/src/debug/kdegraphics-4.3.1/okular/generators/chm/generator_chm.cpp:114
#8  0x00007fa41f653917 in Okular::DocumentPrivate::openDocumentInternal (this=0xebf8f0, offer=<value optimized out>, isstdin=false, docFile=@0x7fff512ee620, filedata=@0x7fff512ee1b0)
    at /usr/src/debug/kdegraphics-4.3.1/okular/core/document.cpp:644
#9  0x00007fa41f65fcd3 in Okular::Document::openDocument (this=0xeb6300, docFile=@0x7fff512ee620, url=<value optimized out>, _mime=<value optimized out>)
    at /usr/src/debug/kdegraphics-4.3.1/okular/core/document.cpp:1634
#10 0x00007fa41f910c1c in Part::openFile (this=0xe67850) at /usr/src/debug/kdegraphics-4.3.1/okular/part.cpp:921
#11 0x000000327281e8c7 in KParts::ReadOnlyPart::openUrl(KUrl const&) () from /usr/lib64/libkparts.so.4
#12 0x00007fa41f9046aa in Part::openUrl (this=0xe67850, _url=<value optimized out>) at /usr/src/debug/kdegraphics-4.3.1/okular/part.cpp:1040
#13 0x000000000040913a in Shell::openUrl (this=0xe513f0, url=@0xe51488) at /usr/src/debug/kdegraphics-4.3.1/okular/shell/shell.cpp:151
#14 0x0000000000409a5c in Shell::qt_metacall (this=0xe513f0, _c=QMetaObject::InvokeMetaMethod, _id=498255360, _a=0x7fff512eeaa0)
    at /usr/src/debug/kdegraphics-4.3.1/x86_64-redhat-linux-gnu/okular/shell/shell.moc:88
#15 0x000000326df547dc in QMetaObject::activate (sender=0x11a90a0, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=0x7fff512edbf0) at kernel/qobject.cpp:3113
#16 0x000000326df597bf in QSingleShotTimer::timerEvent (this=0x11a90a0) at kernel/qtimer.cpp:298
#17 0x000000326df4e7de in QObject::event (this=0x11a90a0, e=0x1f) at kernel/qobject.cpp:1075
#18 0x000000326f18f69c in QApplicationPrivate::notify_helper (this=0xd980a0, receiver=0x11a90a0, e=0x7fff512ef0b0) at kernel/qapplication.cpp:4056
#19 0x000000326f1968fe in QApplication::notify (this=0x7fff512ef400, receiver=0x11a90a0, e=0x7fff512ef0b0) at kernel/qapplication.cpp:4021
#20 0x0000003270c11b56 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#21 0x000000326df3f59c in QCoreApplication::notifyInternal (this=0x7fff512ef400, receiver=0x11a90a0, event=0x7fff512ef0b0) at kernel/qcoreapplication.cpp:610
#22 0x000000326df69fc2 in QCoreApplication::sendEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.h:213
#23 QTimerInfoList::activateTimers (event=<value optimized out>, receiver=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:572
#24 0x000000326df679ed in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:165
#25 0x000000326ce3790e in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#26 0x000000326ce3b0e8 in ?? () from /lib64/libglib-2.0.so.0
#27 0x000000326ce3b20a in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#28 0x000000326df67936 in QEventDispatcherGlib::processEvents (this=0xd7ed90, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327
#29 0x000000326f221f8e in QGuiEventDispatcherGlib::processEvents (this=0x0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#30 0x000000326df3ded2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 36}) at kernel/qeventloop.cpp:149
#31 0x000000326df3e2a4 in QEventLoop::exec (this=0x7fff512ef350, flags={i = 0}) at kernel/qeventloop.cpp:201
#32 0x000000326df40439 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#33 0x0000000000407fc9 in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/src/debug/kdegraphics-4.3.1/okular/shell/main.cpp:81
Warning: the current language does not match this frame.

Reported using DrKonqi
Comment 1 Pino Toscano 2009-10-11 21:28:28 UTC
Can you please provide the faulty document?
Comment 2 NeilBryant 2009-10-11 21:42:24 UTC
Sorry, it's been deleted--but it was literally 1.5 MB of zeroes. I scanned through it, but there was nothing else, so I eventually deleted it.
Comment 3 NeilBryant 2009-10-11 21:47:30 UTC
Created attachment 37524 [details]
fistful of zeroes

I just made this file. If I double-click it, I get the same error.
Comment 4 Pino Toscano 2009-10-11 22:23:17 UTC
Correct, will fix in a moment.
Comment 5 Pino Toscano 2009-10-11 22:24:04 UTC
SVN commit 1034049 by pino:

Better check for libchmfile loading errors.

BUG: 210234


 M  +7 -2      generator_chm.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1034049
Comment 6 Pino Toscano 2009-10-11 22:24:49 UTC
SVN commit 1034050 by pino:

Better check for libchmfile loading errors.
Will be in KDE 4.3.3.

CCBUG: 210234


 M  +7 -2      generator_chm.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1034050