Bug 6190

Summary: mem leak when rendering selection
Product: poppler Reporter: Christian Persch (GNOME) <chpe>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: high CC: nshmyrev
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
URL: http://www.zweitausendeins.de/cmsImgDB/200_MH.pdf
Whiteboard:
i915 platform: i915 features:

Description Christian Persch (GNOME) 2006-03-09 08:00:08 UTC
==16259== 43,584 (18,952 direct, 24,632 indirect) bytes in 2,369 blocks are
definitely lost in loss record 221 of 305
==16259==    at 0x401B7F3: operator new(unsigned) (vg_replace_malloc.c:164)
==16259==    by 0x438D9B5: TextSelectionPainter::visitWord(TextWord*, int, int,
PDFRectangle*) (TextOutputDev.cc:3368)
==16259==    by 0x438DBC9: TextWord::visitSelection(TextSelectionVisitor*,
PDFRectangle*) (TextOutputDev.cc:3400)
==16259==    by 0x438DDF7: TextLine::visitSelection(TextSelectionVisitor*,
PDFRectangle*) (TextOutputDev.cc:3438)
==16259==    by 0x439365D: TextBlock::visitSelection(TextSelectionVisitor*,
PDFRectangle*) (TextOutputDev.cc:3510)
==16259==    by 0x4393857: TextPage::visitSelection(TextSelectionVisitor*,
PDFRectangle*) (TextOutputDev.cc:3583)
==16259==    by 0x4394D9B: TextPage::drawSelection(OutputDev*, double, int,
PDFRectangle*, GfxColor*, GfxColor*) (TextOutputDev.cc:3596)
==16259==    by 0x4394E07: TextOutputDev::drawSelection(OutputDev*, double, int,
PDFRectangle*, GfxColor*, GfxColor*) (TextOutputDev.cc:4180)
==16259==    by 0x42C6266: poppler_page_render_selection (poppler-page.cc:521)
==16259==    by 0x8098BA2: pdf_selection_render_selection(_EvSelection*,
_EvRenderContext*, _GdkPixbuf**, EvRectangle*, EvRectangle*, _GdkColor*,
_GdkColor*) (ev-poppler.cc:1271)
==16259==    by 0x808CA53: ev_selection_render_selection (ev-selection.c:70)
==16259==    by 0x8067CB7: ev_pixbuf_cache_get_selection_pixbuf
(ev-pixbuf-cache.c:837)
==16259==    by 0x806C47B: ev_view_expose_event (ev-view.c:2162)
Comment 1 Christian Persch (GNOME) 2006-03-09 08:03:43 UTC
And a much bigger one too:

==16259== 3,947,532 (3,948 direct, 3,943,584 indirect) bytes in 47 blocks are
definitely lost in loss record 245 of 305
==16259==    at 0x401B7F3: operator new(unsigned) (vg_replace_malloc.c:164)
==16259==    by 0x438F41C: TextBlock::coalesce(UnicodeMap*) (TextOutputDev.cc:1124)
==16259==    by 0x4390901: TextPage::coalesce(int) (TextOutputDev.cc:2306)
==16259==    by 0x439253E: TextOutputDev::endPage() (TextOutputDev.cc:4136)
==16259==    by 0x42C5D52: poppler_page_get_text_output_dev(_PopplerPage*)
(poppler-page.cc:346)
==16259==    by 0x42C6707: poppler_page_get_selection_region (poppler-page.cc:381)
==16259==    by 0x8098CB5: pdf_selection_get_selection_map(_EvSelection*,
_EvRenderContext*) (ev-poppler.cc:1308)
==16259==    by 0x808CAD4: ev_selection_get_selection_map (ev-selection.c:92)
==16259==    by 0x8062162: ev_job_render_run (ev-jobs.c:302)
==16259==    by 0x806095A: handle_job (ev-job-queue.c:104)

Both observed with the PDF at the URL.
Comment 2 Kristian Høgsberg 2006-05-20 08:54:35 UTC
Please re-run against CVS head to see if the mem leak patches from Carlos fix
these leaks.
Comment 3 Benjamin Close 2008-01-11 02:37:16 UTC
Bugzilla Upgrade Mass Bug Change

NEEDSINFO state was removed in Bugzilla 3.x, reopening any bugs previously listed as NEEDSINFO.

  - benjsc
    fd.o Wrangler
Comment 4 Pino Toscano 2008-10-05 07:58:20 UTC
Hello Christian,

can you still notice this issue with more recent Poppler versions?
Comment 5 Christian Persch (GNOME) 2008-10-05 11:45:12 UTC
Seems to not occur anymore.

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.