[Okular-devel] [Bug 282965] Okular (chm file is open) crahsed when quit

zhuli nick198119 at gmail.com
Wed Sep 28 13:52:14 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=282965





--- Comment #4 from zhuli <nick198119 gmail com>  2011-09-28 13:52:13 ---
(In reply to comment #3)
> Can you post a valgrind trace?
> valgrind okular myfile.chm

Okular crashed when chm file is more larger.That chm file cause okular crash is
13.5M.For small chm file such as 300K,okular doesn't crash.

This is valgrind okular large_file.chm 's output:


==9059== Memcheck, a memory error detector
==9059== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==9059== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==9059== Command: okular C++\ GUI\ Programming\ with\ Qt\ 4,\ Second\
Edition.chm
==9059== 

==9059== Conditional jump or move depends on uninitialised value(s)
==9059==    at 0x5F39D19: inflateReset2 (in
/lib/i386-linux-gnu/libz.so.1.2.3.4)
==9059==    by 0x5F39E0C: inflateInit2_ (in
/lib/i386-linux-gnu/libz.so.1.2.3.4)
==9059==    by 0x5F39E92: inflateInit_ (in /lib/i386-linux-gnu/libz.so.1.2.3.4)
==9059==    by 0x61F97A4: png_create_read_struct_2 (in
/lib/i386-linux-gnu/libpng12.so.0.44.0)
==9059==    by 0x61F9989: png_create_read_struct (in
/lib/i386-linux-gnu/libpng12.so.0.44.0)
==9059==    by 0x4B1F8E3: QPngHandlerPrivate::readPngHeader()
(qpnghandler.cpp:368)
==9059==    by 0x4B2067F: QPngHandlerPrivate::readPngImage(QImage*)
(qpnghandler.cpp:439)
==9059==    by 0x4AECA47: QImageReader::read(QImage*) (qimagereader.cpp:1205)
==9059==    by 0x4AED086: QImageReader::read() (qimagereader.cpp:1155)
==9059==    by 0x4AE14BA: operator>>(QDataStream&, QImage&) (qimage.cpp:5204)
==9059==    by 0x4AFD5B3: operator>>(QDataStream&, QPixmap&) (qpixmap.cpp:1329)
==9059==    by 0x46B5FC7: KIconLoaderPrivate::findCachedPixmapWithPath(QString
const&, QPixmap&, QString&) (kiconloader.cpp:876)
==9059== 
okular(9059) KXMLGUI::ActionList::plug: Index  15  is not within range (0 -  12 
--9059-- WARNING: unhandled syscall: 340
--9059-- You may be able to write your own handler.
--9059-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--9059-- Nevertheless we consider this a bug.  Please report
--9059-- it at http://valgrind.org/support/bug_reports.html.
--9059-- WARNING: unhandled syscall: 340
--9059-- You may be able to write your own handler.
--9059-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--9059-- Nevertheless we consider this a bug.  Please report
--9059-- it at http://valgrind.org/support/bug_reports.html.
==9059== Use of uninitialised value of size 4
==9059==    at 0xD6D68B0: LZXdecompress (in /usr/lib/libchm.so.1.0.0)
==9059==    by 0xD6D39FF: chm_retrieve_object (in /usr/lib/libchm.so.1.0.0)
==9059==    by 0xD706998: LCHMFileImpl::RetrieveObject(chmUnitInfo const*,
unsigned char*, unsigned long long, long long) const (libchmfileimpl.cpp:549)
==9059==    by 0xD711B63: LCHMFileImpl::getInfoFromWindows()
(libchmfileimpl.cpp:692)
==9059==    by 0xD712C75: LCHMFileImpl::loadFile(QString const&)
(libchmfileimpl.cpp:102)
==9059==    by 0xD705985: LCHMFile::loadFile(QString const&)
(libchmfile.cpp:40)
==9059==    by 0xD71A73B: CHMGenerator::loadDocument(QString const&,
QVector<Okular::Page*>&) (generator_chm.cpp:88)
==9059==    by 0x9D1F309:
Okular::DocumentPrivate::openDocumentInternal(KSharedPtr<KService> const&,
bool, QString const&, QByteArray const&) (document.cpp:675)
==9059==    by 0x9D292C5: Okular::Document::openDocument(QString const&, KUrl
const&, KSharedPtr<KMimeType> const&) (document.cpp:1632)
==9059==    by 0x9C13452: Okular::Part::openFile() (part.cpp:971)
==9059==    by 0x406D873: KParts::ReadOnlyPartPrivate::openLocalFile()
(part.cpp:592)
==9059==    by 0x406DF41: KParts::ReadOnlyPart::openUrl(KUrl const&)
(part.cpp:556)
==9059== 
==9059== Use of uninitialised value of size 4
==9059==    at 0xD6D6DA0: LZXdecompress (in /usr/lib/libchm.so.1.0.0)
==9059==    by 0xD6D39FF: chm_retrieve_object (in /usr/lib/libchm.so.1.0.0)
==9059==    by 0xD706998: LCHMFileImpl::RetrieveObject(chmUnitInfo const*,
unsigned char*, unsigned long long, long long) const (libchmfileimpl.cpp:549)
==9059==    by 0xD711FC9: LCHMFileImpl::getInfoFromWindows()
(libchmfileimpl.cpp:719)
==9059==    by 0xD712C75: LCHMFileImpl::loadFile(QString const&)
(libchmfileimpl.cpp:102)
==9059==    by 0xD705985: LCHMFile::loadFile(QString const&)
(libchmfile.cpp:40)
==9059==    by 0xD71A73B: CHMGenerator::loadDocument(QString const&,
QVector<Okular::Page*>&) (generator_chm.cpp:88)
==9059==    by 0x9D1F309:
Okular::DocumentPrivate::openDocumentInternal(KSharedPtr<KService> const&,
bool, QString const&, QByteArray const&) (document.cpp:675)
==9059==    by 0x9D292C5: Okular::Document::openDocument(QString const&, KUrl
const&, KSharedPtr<KMimeType> const&) (document.cpp:1632)
==9059==    by 0x9C13452: Okular::Part::openFile() (part.cpp:971)
==9059==    by 0x406D873: KParts::ReadOnlyPartPrivate::openLocalFile()
(part.cpp:592)
==9059==    by 0x406DF41: KParts::ReadOnlyPart::openUrl(KUrl const&)
(part.cpp:556)
==9059== 
==9059== Use of uninitialised value of size 4
==9059==    at 0xD6D68B0: LZXdecompress (in /usr/lib/libchm.so.1.0.0)
==9059==    by 0xD6D373B: chm_retrieve_object (in /usr/lib/libchm.so.1.0.0)
==9059==    by 0xD706998: LCHMFileImpl::RetrieveObject(chmUnitInfo const*,
unsigned char*, unsigned long long, long long) const (libchmfileimpl.cpp:549)
==9059==    by 0xD712540: LCHMFileImpl::fillTopicsUrlMap()
(libchmfileimpl.cpp:1257)
==9059==    by 0xD712D9B: LCHMFileImpl::loadFile(QString const&)
(libchmfileimpl.cpp:113)
==9059==    by 0xD705985: LCHMFile::loadFile(QString const&)
(libchmfile.cpp:40)
==9059==    by 0xD71A73B: CHMGenerator::loadDocument(QString const&,
QVector<Okular::Page*>&) (generator_chm.cpp:88)
==9059==    by 0x9D1F309:
Okular::DocumentPrivate::openDocumentInternal(KSharedPtr<KService> const&,
bool, QString const&, QByteArray const&) (document.cpp:675)
==9059==    by 0x9D292C5: Okular::Document::openDocument(QString const&, KUrl
const&, KSharedPtr<KMimeType> const&) (document.cpp:1632)
==9059==    by 0x9C13452: Okular::Part::openFile() (part.cpp:971)
==9059==    by 0x406D873: KParts::ReadOnlyPartPrivate::openLocalFile()
(part.cpp:592)
==9059==    by 0x406DF41: KParts::ReadOnlyPart::openUrl(KUrl const&)
(part.cpp:556)
==9059== 
==9059== Use of uninitialised value of size 4
==9059==    at 0xD6D68B0: LZXdecompress (in /usr/lib/libchm.so.1.0.0)
==9059==    by 0xD6D39FF: chm_retrieve_object (in /usr/lib/libchm.so.1.0.0)
==9059==    by 0xD706998: LCHMFileImpl::RetrieveObject(chmUnitInfo const*,
unsigned char*, unsigned long long, long long) const (libchmfileimpl.cpp:549)
==9059==    by 0xD7077FA: LCHMFileImpl::getFileContentAsBinary(QByteArray*,
QString const&) const (libchmfileimpl.cpp:1126)
==9059==    by 0xD707868: LCHMFileImpl::getFileContentAsString(QString*,
QString const&, bool) (libchmfileimpl.cpp:1137)
==9059==    by 0xD7104E0: LCHMFileImpl::parseFileAndFillArray(QString const&,
QVector<LCHMParsedEntry>*, bool) (libchmfileimpl.cpp:947)
==9059==    by 0xD705C45:
LCHMFile::parseTableOfContents(QVector<LCHMParsedEntry>*) const
(libchmfile.cpp:76)
==9059==    by 0xD71A79F: CHMGenerator::loadDocument(QString const&,
QVector<Okular::Page*>&) (generator_chm.cpp:96)
==9059==    by 0x9D1F309:
Okular::DocumentPrivate::openDocumentInternal(KSharedPtr<KService> const&,
bool, QString const&, QByteArray const&) (document.cpp:675)
==9059==    by 0x9D292C5: Okular::Document::openDocument(QString const&, KUrl
const&, KSharedPtr<KMimeType> const&) (document.cpp:1632)
==9059==    by 0x9C13452: Okular::Part::openFile() (part.cpp:971)
==9059==    by 0x406D873: KParts::ReadOnlyPartPrivate::openLocalFile()
(part.cpp:592)
==9059== 
okular(9059)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest:
Running out of memory on page 124 (1052x22407 px);
okular(9059)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: this
message will be reported only once.                                             
okular(9059)/kdeui (kdelibs) KXMLGUIClient::~KXMLGUIClient: 0x987ca14 deleted
without having been removed from the factory first. This will leak standalone
popupmenus and could lead to crashes.                                           
==9059==                                                                        
==9059== HEAP SUMMARY:                                                          
==9059==     in use at exit: 609,844 bytes in 11,833 blocks                     
==9059==   total heap usage: 17,257,922 allocs, 17,246,089 frees, 2,602,343,798
bytes allocated                                                                 
==9059==                                                                        
==9059== LEAK SUMMARY:                                                          
==9059==    definitely lost: 11,956 bytes in 1,227 blocks                       
==9059==    indirectly lost: 164,704 bytes in 1,242 blocks                      
==9059==      possibly lost: 4,952 bytes in 26 blocks                           
==9059==    still reachable: 428,232 bytes in 9,338 blocks                      
==9059==         suppressed: 0 bytes in 0 blocks
==9059== Rerun with --leak-check=full to see details of leaked memory
==9059== 
==9059== For counts of detected and suppressed errors, rerun with: -v
==9059== Use --track-origins=yes to see where uninitialised values come from
==9059== ERROR SUMMARY: 78 errors from 5 contexts (suppressed: 285 from 15)

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Okular-devel mailing list