To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=113701 Issue #|113701 Summary|sd: When saving ppt file, it shows big memory leaks Component|Drawing Version|OOO310m11 Platform|All URL| OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|PATCH Priority|P2 Subcomponent|code Assigned to|graphicsneedsconfirm Reported by|zhangjfibm
------- Additional comments from [email protected] Fri Aug 6 07:07:42 +0000 2010 ------- When save a ppt file, a lot of leaked objects are created with this call stack, MSVCR90!operator new+0000001F (f:\dd\vctools\crt_bld\self_x86\crt\src\new.cpp, 59) sotmi!StgPage::StgPage+00000023 sotmi!StgCache::Create+0000002F sotmi!StgCache::Copy+0000001F sotmi!StgFATStrm::SetSize+000000E4 sotmi!StgFAT::AllocPages+000000CC sotmi!StgStrm::SetSize+0000005B sotmi!StgDataStrm::SetSize+0000002A sotmi!StgDirEntry::Tmp2Strm+000000D0 sotmi!StgDirEntry::StoreStream+0000005D sotmi!StgDirEntry::StoreStreams+00000010 sotmi!StgDirEntry::StoreStreams+00000025 sotmi!StgDirEntry::StoreStreams+00000036 sotmi!StgDirEntry::StoreStreams+0000004A sotmi!StgDirStrm::Store+00000031 sotmi!StgIo::CommitAll+0000000F sotmi!SotStorage::Commit+0000000F sdmi!sd::DrawDocShell::ConvertTo+00000334 (z:\impr\sd\source\ui\docshell\docshel4.cxx, 744) sfxmi!SfxObjectShell::SaveTo_Impl+00001CA3 (z:\lib\sfx2\source\doc\objstor.cxx, 1752) sfxmi!SfxObjectShell::PreDoSaveAs_Impl+00000341 (z:\lib\sfx2\source\doc\objstor.cxx, 3028) sfxmi!SfxObjectShell::CommonSaveAs_Impl+000007EA (z:\lib\sfx2\source\doc\objstor.cxx, 2879) sfxmi!SfxObjectShell::APISaveAs_Impl+0000038F (z:\lib\sfx2\source\doc\objserv.cxx, 349) sfxmi!SfxBaseModel::impl_store+00000DF2 (z:\lib\sfx2\source\doc\sfxbasemodel.cxx, 2742) sfxmi!SfxBaseModel::storeAsURL+00000153 (z:\lib\sfx2\source\doc\sfxbasemodel.cxx, 1610) The root cause is after saving ppt files, the stream opened for writing contents is not freed, which in sequence cause the storage cache object used for saving ppt file is not released. It has many cache buffer, which shows big memory leak. Look more clear at the code, In method PPTWriter::PPTWriter(), it creates several streams object from PPTWriter::PPTWriter() { mpStrm = mrStg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "PowerPoint Document" ) ) ); if ( !mpStrm ) return; if ( !mpPicStrm ) mpPicStrm = mrStg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Pictures" ) ) ); ... } } in method PPTWriter::ImplCreateCurrentUserStream(), it creates another stream, sal_Bool PPTWriter::ImplCreateCurrentUserStream() { mpCurUserStrm = mrStg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Current User" ) ) ); if ( !mpCurUserStrm ) return FALSE; ... } All these allocated stream object are not released when PPTWriter object is destoried. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
