Summary: | evince crashed with SIGSEGV in TextWord::TextWord() | ||
---|---|---|---|
Product: | poppler | Reporter: | Pedro Villavicencio <pvillavi> |
Component: | cairo backend | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
URL: | https://bugs.edge.launchpad.net/ubuntu/+source/poppler/+bug/436197 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | This fixes it, but may be a hack |
Description
Pedro Villavicencio
2009-10-05 12:18:17 UTC
Moving to cairo backend, i can't reproduce the crash using pdftotext or qt4 test tools but can reproduce it using the glib demo (crashes extracting text from page 2) Created attachment 32188 [details] [review] This fixes it, but may be a hack I threw this patch together very quickly after looking at the problem. It fixes the problem but I have not looked into this in-depth yet and it may be a hack. I have been looking at this bug. I wrote a little about it here - http://www.vartmp.com/blog/subjects/poppler/20091219.html The segmentation fault happens when the TextWord constructor is called. Specifically, when the constructor is called from the beginWord method. The reason the segmentation fault happens is because the curFont object has not been created prior to this, despite it being one of the parameters sent to the TextWord constructor. On the basis of seeing this, I did a four-line hack in the beginWord method that checks for the existence of curFont, and if it does not exist, creates it and then calls "fonts->append(curFont)". After this, evince stopped crashing on the pages of the PDFs that it has been crashing (segfaulting) on. However, I have not really looked into this indepth, what I did was just a hack. I am looking through the code of evince and poppler right now, and recreating the segfaults. It is possible that there is a better way to solve this, perhaps creating the curFont object in a different method, or who knows. If I come up with something better I'll give you an update. Or if one of you see something better that's good too. Thank you very much for the patch, what poppler version are you using? I fixed this problem in poppler git recently, I didn't realize it was reported here too so I didn't close this bug, sorry. The commit that fixes this is: http://cgit.freedesktop.org/poppler/poppler/commit/?id=4e6af25a028d16608111634c5467420e31fa399b Feel free to reopen if it still crahes with current git master. Thanks. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.