Summary: | Crash selecting text with splash backend | ||
---|---|---|---|
Product: | poppler | Reporter: | Nickolay V. Shmyrev <nshmyrev> |
Component: | general | Assignee: | Kristian Høgsberg <krh> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | CC: | daniel.holbach, mitch, seb128 |
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Test document
Fix by Gary Coady |
Description
Nickolay V. Shmyrev
2005-09-17 04:44:38 UTC
Created attachment 3308 [details]
Test document
To get a crash select tree lines at document top.
The ubuntu bugzilla has a bug about that too: http://bugzilla.ubuntu.com/show_bug.cgi?id=18848 This is still reproducible with the patch from #4402. It's definitely a different bug. I've investigated this question a bit: the reason is that TextPage on word creation copy GfxFont from context, but then this GfxFont is destroyed. After that usage of TextPage functions may crash app. We need to copy GfxFont on TextPage::updateFont or ref it somehow. I am not sure how to fix it properly, it seems there is no way to dup or ref GfxFont Gary Coady came up with a fix, which seems to fix https://launchpad.net/bugs/41661 https://launchpad.net/bugs/36747 and https://launchpad.net/bugs/24970 as well: http://librarian.launchpad.net/2382580/poppler_fixmem.patch *attaching it in a bit* Created attachment 5495 [details] [review] Fix by Gary Coady Thanks, that was just the patch I was looking for :) Committed to CVS head, closing this bug. *** Bug 6007 has been marked as a duplicate of this bug. *** After this patch (and the subsequent 05-13 leak fix), the convention is that you have to call font->incRefCnt() before calling GfxState::setFont, but setFont will deal with calling font->decRefCnt() on the old font for you. That's just awful. The incRefCnt()s in Gfx::opSetFont and TextSelectionPainter::visitWord should be removed, and GfxState::setFont should inc the font itself. |
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.