Issue 116448 - Memory leak when exporting PDF with XStorable.storeToURL
Summary: Memory leak when exporting PDF with XStorable.storeToURL
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: DEV300m96
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Oliver Specht
QA Contact: issues@sw
Depends on:
Blocks: 121366
  Show dependency tree
Reported: 2011-01-13 12:03 UTC by eymux2009
Modified: 2012-11-30 04:47 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

test document with macro (8.75 KB, application/vnd.oasis.opendocument.text)
2011-01-13 12:05 UTC, eymux2009
no flags Details
Patch for OOo 3.2.1 (508 bytes, patch)
2012-07-11 08:09 UTC, eymux2009
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description eymux2009 2011-01-13 12:03:26 UTC
The macro in the attached document exports the document 4000 times as PDF via
storeToURL. Running it once on a computer with 2GB RAM leaks enough memory to
have a visible effect on the stability of Windows. UI elements are no longer
drawn, new forms won't open and other programs won't start. Running the macro
twice makes Windows all but unusable.

Steps to reproduce:
* Open the attached document
* Launch the macro storeToUrl_error.odt/Standard/Module1/Main
* Wait for the macro to exit

Note: if your computer has more than 2GB RAM, you might have to run the macro
more often.
Comment 1 eymux2009 2011-01-13 12:05:00 UTC
Created attachment 75550 [details]
test document with macro
Comment 2 michael.ruess 2011-01-14 08:12:12 UTC
MRU->OS: run the Main Macro attached to the document. See that Writer will now
eat up slowly but continuously memory.
Comment 3 eymux2009 2012-07-11 08:09:29 UTC
Created attachment 78625 [details]
Patch for OOo 3.2.1

I have tracked down the source of the memory leak in OOo 3.2.1 and created a patch.
Comment 4 SVN Robot 2012-08-01 12:54:30 UTC
"hdu" committed SVN revision 1367969 into trunk:
#i116448# fix memory leak when exporting PDF with XStorable.storeToURLPatch-b...
Comment 5 2012-08-01 12:56:52 UTC
Thanks a lot for reporting, analyzing and solving the problem! Changing the status to FIXED now that your patch has been applied.
Comment 6 Yan Ji 2012-11-30 04:47:34 UTC
Since last SVT(r1400866) shows there is no memory leak, so close this defect as resolved.