Bug 166145 - Hangs when opening: File, Properties dialog
Summary: Hangs when opening: File, Properties dialog
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 16:35 UTC by Juha Tuomala
Modified: 2008-07-24 20:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juha Tuomala 2008-07-09 16:35:20 UTC
Version:            (using KDE 3.5.9)
Installed from:    Fedora RPMs

File, open, put this url into file filed, ok.

http://www.vero.fi/nc/doc/download.asp?id=5222;60072


it opens a PDF. Choose File, Properties and program hangs, segfaults after a while if you 
choose to do nothing.

[Thread 1084229968 (LWP 15961) exited]
[New Thread 1084229968 (LWP 15962)]
[Thread 1084229968 (LWP 15962) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912498677680 (LWP 15941)]
malloc_consolidate (av=0x3d87552980) at malloc.c:4772
4772    {
Current language:  auto; currently c


backtrace has endless loop on that line 681.

#0  malloc_consolidate (av=0x3d87552980) at malloc.c:4772
#1  0x0000003d87272f3d in _int_malloc (av=0x3d87552980, bytes=1025) at malloc.c:4166
#2  0x0000003d87274147 in _int_realloc (av=0x3d87552980, oldmem=0x2aaafcd3c920, bytes=<value optimized out>) at malloc.c:4972
#3  0x0000003d8727625f in __libc_realloc (oldmem=0x2aaafcd3c920, bytes=1024) at malloc.c:3709
#4  0x00002aaab080bc85 in grealloc (p=0x3d87552980, size=1025) at gmem.cc:141
#5  0x00002aaab07973bc in Array::add (this=0x2aaafc863f90, elem=0x7fff3e715280) at Array.cc:47
#6  0x00002aaab07db2f4 in Parser::getObj (this=0x2aaafcabdef0, obj=0x7fff3e715300, fileKey=0x0, encAlgorithm=cryptRC4,
    keyLength=0, objNum=196, objGen=0) at Object.h:226
#7  0x00002aaab07db4f5 in Parser::getObj (this=0x2aaafcabdef0, obj=0x7fff3e715890, fileKey=0x0, encAlgorithm=cryptRC4,
    keyLength=0, objNum=196, objGen=0) at Parser.cc:86
#8  0x00002aaab07dbcbe in XRef::fetch (this=0x9a3e40, num=196, gen=0, obj=0x7fff3e715890) at XRef.cc:824
#9  0x00002aaab07f9ecd in Gfx8BitFont (this=0x11b2c40, xref=0x9a3e40, tagA=<value optimized out>, idA=<value optimized out>,
    nameA=<value optimized out>, typeA=<value optimized out>, fontDict=0x2aaafcd2a540) at GfxFont.cc:557
#10 0x00002aaab07fdef9 in GfxFont::makeFont (xref=0x9a3e40, tagA=0x2aaafcd4f310 "Helvetica", idA={num = 195, gen = 0},
    fontDict=0x2aaafcd2a540) at GfxFont.cc:120
#11 0x00002aaab07fe144 in GfxFontDict (this=0x2aaafcd4f130, xref=0x9a3e40, fontDictRef=0x0, fontDict=0x2aaafcd2a410)
    at GfxFont.cc:1582
#12 0x00002aaab085794d in PDFGenerator::scanFonts (this=0xa28990, resDict=0x2aaafcd33ae0, list=0x9c90a0, fonts=0x7fff3f3121c8,
    fontsLen=@0x7fff3f31220c, fontsSize=@0x7fff3f312208) at generator_pdf.cpp:658
#13 0x00002aaab0857921 in PDFGenerator::scanFonts (this=0xa28990, resDict=0x2aaafcc58740, list=0x9c90a0, fonts=0x7fff3f3121c8,
    fontsLen=@0x7fff3f31220c, fontsSize=@0x7fff3f312208) at generator_pdf.cpp:681
#14 0x00002aaab0857921 in PDFGenerator::scanFonts (this=0xa28990, resDict=0x2aaafcceab30, list=0x9c90a0, fonts=0x7fff3f3121c8,
    fontsLen=@0x7fff3f31220c, fontsSize=@0x7fff3f312208) at generator_pdf.cpp:681
#15 0x00002aaab0857921 in PDFGenerator::scanFonts (this=0xa28990, resDict=0x2aaafcbfde20, list=0x9c90a0, fonts=0x7fff3f3121c8,
    fontsLen=@0x7fff3f31220c, fontsSize=@0x7fff3f312208) at generator_pdf.cpp:681
#16 0x00002aaab0857921 in PDFGenerator::scanFonts (this=0xa28990, resDict=0x2aaafcbf42d0, list=0x9c90a0, fonts=0x7fff3f3121c8,
    fontsLen=@0x7fff3f31220c, fontsSize=@0x7fff3f312208) at generator_pdf.cpp:681
#17 0x00002aaab0857921 in PDFGenerator::scanFonts (this=0xa28990, resDict=0x2aaafccfc550, list=0x9c90a0, fonts=0x7fff3f3121c8,
    fontsLen=@0x7fff3f31220c, fontsSize=@0x7fff3f312208) at generator_pdf.cpp:681


This is x86_64 arch.
Comment 1 Albert Astals Cid 2008-07-22 21:46:51 UTC
SVN commit 836688 by aacid:

Some documents have loops in XObject dictionaries, make sure we don't get in an infinite loop while traversing them

BUG: 166145


 M  +34 -13    generator_pdf.cpp  
 M  +1 -1      generator_pdf.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=836688
Comment 2 Juha Tuomala 2008-07-24 20:39:53 UTC
Thanks! :)