Bug#484224: Same with Apple HG, backtrace and incrimented code

Antoine Cailliau a.cailliau at ac-graphic.net
Thu Jun 12 13:58:41 UTC 2008


Same problem occurs with the pdf version of Apple Human Guideline. 



Here is the backtrace given by gdb (the backtrace is the same that the one

we get with the "crash.pdf" file)

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0xb6bcab90 (LWP 7871)]

0xb6ffa069 in OCGs::findOcgByRef (this=0x836fd00, ref=@0xb6bc98fc) at

OptionalContent.cc:165

165	  for (int i=0; i < optionalContentGroups->getLength(); ++i) {

Current language:  auto; currently c++

(gdb) bt

#0  0xb6ffa069 in OCGs::findOcgByRef (this=0x836fd00, ref=@0xb6bc98fc) at

OptionalContent.cc:165

#1  0xb6ffa684 in OCGs::optContentIsVisible (this=0x836fd00,

dictRef=0xb6bc9940) at OptionalContent.cc:220

#2  0xb6fb35f1 in Gfx::opBeginMarkedContent (this=0x819e400,

args=0xb6bc99f0, numArgs=2) at Gfx.cc:4142

#3  0xb6fb2a72 in Gfx::execOp (this=0x819e400, cmd=0xb6bc9b90,

args=0xb6bc99f0, numArgs=2) at Gfx.cc:740

#4  0xb6fb2c4e in Gfx::go (this=0x819e400, topLevel=0) at Gfx.cc:611

#5  0xb6fb857f in Gfx::display (this=0x819e400, obj=0xb6bc9e0c, topLevel=0)

at Gfx.cc:580

#6  0xb6fb8970 in Gfx::doForm1 (this=0x819e400, str=0xb6bc9e0c,

resDict=0x833e988, matrix=0xb6bc9cf0, bbox=0xb6bc9d20, transpGroup=0,

softMask=0, blendingColorSpace=0x0, 

    isolated=0, knockout=0, alpha=0, transferFunc=0x0, backdropColor=0x0)

at Gfx.cc:3996

#7  0xb6fbbf29 in Gfx::doForm (this=0x819e400, str=0xb6bc9e0c) at

Gfx.cc:3924

#8  0xb6fbf10f in Gfx::opXObject (this=0x819e400, args=0xb6bc9ec0,

numArgs=1) at Gfx.cc:3490

#9  0xb6fb2a72 in Gfx::execOp (this=0x819e400, cmd=0xb6bca060,

args=0xb6bc9ec0, numArgs=1) at Gfx.cc:740

#10 0xb6fb2c4e in Gfx::go (this=0x819e400, topLevel=1) at Gfx.cc:611

#11 0xb6fb857f in Gfx::display (this=0x819e400, obj=0xb6bca13c, topLevel=1)

at Gfx.cc:580

#12 0xb6ffd8d6 in Page::displaySlice (this=0x83708a8, out=0x8370420,

hDPI=72, vDPI=72, rotate=0, useMediaBox=0, crop=1, sliceX=-1, sliceY=-1,

sliceW=-1, sliceH=-1, printing=0, 

    catalog=0x836fb28, abortCheckCbk=0, abortCheckCbkData=0x0,

annotDisplayDecideCbk=0, annotDisplayDecideCbkData=0x0) at Page.cc:414

#13 0xb782ec03 in _poppler_page_render (page=0x81e1ef0, cairo=0x8387118,

printing=0) at poppler-page.cc:529

#14 0xb782ed37 in poppler_page_render (page=0x81e1ef0, cairo=0x8387118) at

poppler-page.cc:550

#15 0xb612d925 in pdf_document_render (document=0x81e1f18, rc=0x81e6f18) at

/tmp/buildd/evince-2.22.2/./backend/pdf/ev-poppler.cc:488

#16 0xb80b92d0 in ev_document_render (document=0x81e1f18, rc=0x81e6f18) at

/tmp/buildd/evince-2.22.2/./libdocument/ev-document.c:221

#17 0x0806118e in ev_job_render_run (job=0x83190d0) at

/tmp/buildd/evince-2.22.2/./shell/ev-jobs.c:372

#18 0x0805f463 in handle_job (job=0x83190d0) at

/tmp/buildd/evince-2.22.2/./shell/ev-job-queue.c:137

#19 0x0805f9ac in ev_render_thread (data=0x0) at

/tmp/buildd/evince-2.22.2/./shell/ev-job-queue.c:264

#20 0xb74244ff in ?? () from /usr/lib/libglib-2.0.so.0

#21 0x00000000 in ?? ()



So, the problem is, probably located in OptionalContent.cc at the line 165.

Here is the interresting part of the code.

OptionalContentGroup* OCGs::findOcgByRef( const Ref &ref)

{

  //TODO: make this more efficient

  OptionalContentGroup *ocg = NULL;

  for (int i=0; i < optionalContentGroups->getLength(); ++i) { // This is

the line 165

    ocg = (OptionalContentGroup*)optionalContentGroups->get(i);

    if ( (ocg->ref().num == ref.num) && (ocg->ref().gen == ref.gen) ) {

      return ocg;

    }

  }

  // not found

  return NULL;

}



I do not know how to fix this segfault.



Antoine C. 







More information about the pkg-gnome-maintainers mailing list