Issue 116448

Summary: Memory leak when exporting PDF with XStorable.storeToURL
Product: Writer Reporter: eymux2009 <eymux2009>
Component: save-exportAssignee: Oliver Specht <os_ooo>
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Normal    
Priority: P3 CC: hdu, issues, peter.jentsch
Version: DEV300m96   
Target Milestone: 4.0.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 121366    
Attachments:
Description Flags
test document with macro
none
Patch for OOo 3.2.1 none

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 hdu@apache.org 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.