Issue 71748 - memory leak exporting to PowerPoint or HTML
Summary: memory leak exporting to PowerPoint or HTML
Status: CONFIRMED
Alias: None
Product: Impress
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.1
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needmoreinfo, oooqa
Depends on:
Blocks:
 
Reported: 2006-11-19 19:53 UTC by aziem
Modified: 2013-08-07 15:20 UTC (History)
3 users (show)

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


Attachments
A script to generate arbitrary number of photos. Includes instructions. (1.00 KB, text/plain)
2007-03-22 06:30 UTC, aziem
no flags Details
first crash stack trace from my last comment (9.45 KB, text/plain)
2007-03-22 16:45 UTC, aziem
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description aziem 2006-11-19 19:53:02 UTC
To reproduce:
1. Open a presentation with many slides (e.g. 150 slides)---each with a high
resolution image (e.g. 2576x1932 pixels.)
2. Export to PowerPoint or HTML

Results:
OpenOffice.org consumes so much memory that the system dies.  After exporting
about 70 of 150 slides, top reported OpenOffice.org had >1GB VIRT memory, but
the system stopped responding.  Therefore, it is not possible to finish the
export process on a reasonably-powered machine.

Comment:
Is the memory of each slide not freed when working on the next slide?

Test system:
OpenOffice.org OOE680_m2 (pre-2.1) on Linux
OpenOffice.org 2.0.4 on Windows
Comment 1 wolframgarten 2006-11-21 08:09:30 UTC
Reassigned.
Comment 2 kpalagin 2007-03-22 05:31:58 UTC
aziem,
please provide sample (not easy, I understand). I just don't have enough high-
res pictures to generate 150 unique slides. Duplicating the same slide or even 
inserting the same picture on different slides does not expose memory leak - 
apparently Impress recognises the image as the same and just reuses it.
Also please make sure that memory is leaking, that is if you repeatedly save 
the shorter presentation several times without closing it you get all RAM 
consumed. Or just Impress tries to allocate RAM for conversion of all 150 
slides and fails.
Comment 3 aziem 2007-03-22 06:30:25 UTC
Created attachment 43848 [details]
A script to generate arbitrary number of photos.  Includes instructions.
Comment 4 aziem 2007-03-22 16:43:52 UTC
System: OOo 2.1, Linux 2.6, dual AMD Opteron 252 CPUs, 4GB physical RAM
Images: 152 images @ 500x500, 13M total

1. Empty blank Impress document: 164m VIRT, 53m RES, 34m SHR
2. After importing: 297m 186m 38m
3. Close blank Impress document: crash with error recovery and stack track

Start over because of crash.

1. Empty blank Impress document: 165m VIRT, 53m RES, 34m SHR
2. After importing: 299m 187m 38m
3. After saving to PPT 97/XP/2003 format:   413m 302m  39m 
4. After closing big Impress document: 368m 257m  39m 
5. After closing blank Impress document: crash with error recovery and stack track
6. Close OOo
7. After opening saved PPT:  197m  79m  34m 

System: OOo 2.2rc3 (680m11 build 9129)

1. Empty blank Impress document: 174m  58m  36m
2. After importing:  301m 187m  39m 
3. After saving to PPT 97/XP/2003 format: 415m 302m  40m 
4. After closing big Impress document:  356m 243m  40m 
5. After closing blank Impress document: crash with error recovery and stack track
6. Close OOo
7. After opening saved PPT:  207m  82m  35m 
Comment 5 aziem 2007-03-22 16:45:04 UTC
Created attachment 43874 [details]
first crash stack trace from my last comment
Comment 6 kpalagin 2007-03-22 16:51:35 UTC
aziem,
any chance you could upload your .odp file to, say, www.mytempdir.com?
Thanks a lot.
Comment 7 aziem 2007-03-22 17:12:41 UTC
test.ppt
http://www.mytempdir.com/1265075 
12,277,248 bytes
md5sum: 450bbc417c6f9ec8c00f452a63f0b232
Comment 8 kpalagin 2007-03-22 18:45:38 UTC
aziem,
I can't reproduce the crash or leak. I have tried 2.1 and 2.2rc2 and rc4 on 3 
installations of Windows and 2.0.4 and 2.2rc3 on Suse 10.2.
Can you reproduce the problem on plain vanilla installation of either Windows 
or Linux - just OS, drivers and OO (no fonts, no additional utils, nothing 
else)?
Or see if disabling one CPU will fix the problem.
Comment 9 aziem 2007-03-22 18:49:18 UTC
You don't see massive memory usage, much of which is unreleased?  Did you go
through the whole process I described?

I don't understand what you exactly mean by plain vanilla (you want me to
uninstall Solitaire or what?), and that seems irrelevant anyway.  Also, I have
reproduced this problem on at least three pieces of hardware (one Win XP, two
Linux), and only one machine had multiple CPUs.
Comment 10 kpalagin 2007-03-22 19:19:53 UTC
My steps:
1. Close OO and QS.
2. Start Impress 2.2RC2, click "Create empty presentation". 
soffice.bin - RAM=6.6MB, Virtual Mem=19.2MB
3. File - Open - Test.ppt
soffice.bin - RAM=37MB, VM=26.4MB
4. Files - Save As - test123.ppt
soffice.bin - RAM=40MB (peaking to 74.3MB), VM=28.4MB.
5. File - Close. Memory usage remains the same.
Have you installed any fonts (in addition to Solitaire)?
Comment 11 aziem 2007-03-22 19:29:40 UTC
Your memory usage seems much less than mine, but (a) you didn't mention the
details of your system and (b) you didn't follow the whole process starting with
a blank presentation and importing the images.  In real life, that's relevant
because not everyone has a machine handy with 4GB RAM for the purpose of
creating the initial PowerPoint file.

Here are the 152 images to follow the whole process:
http://www.mytempdir.com/1265213

Anyway, I still don't see how things like fonts and utilities are relevant, and
Solitaire is the classic Windows game: I was joking about that in reference to
your vanilla proposition.

Comment 12 kpalagin 2007-03-22 22:34:25 UTC
a) one of my machines - Athlon XP 2400, 1.5GB of RAM.
b) by importing you mean Insert - Picture - From file, one picture per slide?
I have done just that, creating deck of 83 slides. Mem usage before saving 
as .ppt and after did not change by more than 1MB (peaking at 136MB)
c) I know you were joking about Solitaire
Comment 13 aziem 2007-03-23 16:06:49 UTC
Can someone test this with Fedora or a non-SUSE Linux distribution?

Windows XP SP2, OOo 2.1

1. Blank Impress doc: 40,728K
2. After using Album Creator to make 152 slides: 50,678K
3. After saving to 97/2000/XP PPT: 178,688K
4. After closing blank Impress doc: 175,736K (no crash)
5. After closing big Impress doc: 54,856K
6. Close OOO and QuickStarter
7. After opening PPT: 37,096K
Comment 14 aziem 2007-03-23 16:45:59 UTC
Using larger resolution 2514x1686 instead of 500x500, I see the especially
painful saving process I saw when I first reported this issue.   It's a
reasonable usage scenario if you image showing someone photos from your digital
camera from your fun trip to wherever.

You can use my script and http://photojournal.jpl.nasa.gov/jpeg/PIA01919.jpg to
reproduce make 150 images.

Windows XP SP2, OOo 2.1

1. Blank Impress doc:  41,308K
2. After using Album Creator to make 152 slides: 21,964K (was as high as 112,000K)
3. After saving to PPT: 17,296K Mem + 1,601,132K VM <--- ouch!!!
4. After closing big Impress doc: 22,688K + 31,572K VM
Comment 15 christian.guenther 2007-03-27 13:17:56 UTC
Set to new and change the target.
Comment 16 christian.guenther 2007-03-27 13:21:26 UTC
I can reproduce the bug.
Take the bugdoc 'viele_grafiken' (I can send it to you)
export the document first as PPT and then as HTML.
while exporting to HTML the office freeze.
Comment 17 Martin Hollmichel 2008-01-25 17:16:39 UTC
set target to 3.0
Comment 18 sven.jacobi 2008-06-09 12:30:09 UTC
i have not enough time to evaluate this problem, changed target to 3.x