Kaydet (Commit) 036d8cb3 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Caolán McNamara

crashtesting: ooo72057-1.doc

fallout from
    commit 65e41592
    pass SvStream around by std::unique_ptr

The backtrace where it was was freeing the SvStream we need is below,
the code seems dodgy because it is re-creating the underlying SvStream. Before
65e41592, it just leaked the SvStream.

0  SvStream::~SvStream()
    at tools/source/stream/stream.cxx:369
1  SvFileStream::~SvFileStream()
    at tools/source/stream/strmunx.cxx:300
2  SvFileStream::~SvFileStream()
    at tools/source/stream/strmunx.cxx:298
3  std::default_delete<SvStream>::operator()(SvStream*) const
4  std::unique_ptr<SvStream, std::default_delete<SvStream> >::reset(SvStream*)
5  std::unique_ptr<SvStream, std::default_delete<SvStream> >::operator=(std::unique_ptr<SvStream, std::default_delete<SvStream> >&&)
6  SfxMedium::GetMedium_Impl()
     at sfx2/source/doc/docfile.cxx:2603
7  SfxMedium::GetInputStream()
    at sfx2/source/doc/docfile.cxx:3329
8  ImportExcel8::ReadBasic()
    at sc/source/filter/excel/excimp8.cxx:391
9  ImportExcel8::PostDocLoad()
    at sc/source/filter/excel/excimp8.cxx:425
10 ImportExcel8::Read() (this=0x4727a10)
    at sc/source/filter/excel/read.cxx:1298
11 ScFormatFilterPluginImpl::ScImportExcel(SfxMedium&, ScDocument*, EXCIMPFORMAT)
    at sc/source/filter/excel/excel.cxx:142

Change-Id: I4fb769a7da71ef9a27ddef1581448efb3d303bde
Reviewed-on: https://gerrit.libreoffice.org/57843
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0549b5dd
......@@ -2597,7 +2597,7 @@ void SfxMedium::GetMedium_Impl()
if ( !GetError() && !pImpl->xStream.is() && !pImpl->xInputStream.is() )
SetError(ERRCODE_IO_ACCESSDENIED);
if ( !GetError() )
if ( !GetError() && !pImpl->m_pInStream )
{
if ( pImpl->xStream.is() )
pImpl->m_pInStream = utl::UcbStreamHelper::CreateStream( pImpl->xStream );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment