Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


I did a debug build. And I had some stl debug symbols in my backtrace so it
might be that perhaps the compiler won't optimize this out.

I attached the backtrace.

print it shows: it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence =
0x29e3678, _M_version = 0, _M_prior = 0x0, _M_next = 0x0}, _M_current =
{_M_current = 0x2a27bf0}}

and print maPersistTable:
$2 = {<std::__norm::vector<EscherPersistEntry*,
std::allocator<EscherPersistEntry*> >> =
{<std::__norm::_Vector_base<EscherPersistEntry*,
std::allocator<EscherPersistEntry*> >> = {_M_impl =
{<std::allocator<EscherPersistEntry*>> =
    {<__gnu_cxx::new_allocator<EscherPersistEntry*>> = {<No data fields>},
<No data fields>}, _M_start = 0x2a27bc8, _M_finish = 0x2a27bf0,
_M_end_of_storage =
    0x2a27c08}}, <No data fields>},
<__gnu_debug::_Safe_sequence<std::__debug::vector<EscherPersistEntry*,
std::allocator<EscherPersistEntry*> > >> =
{<__gnu_debug::_Safe_sequence_base> = {_M_iterators = 0x7fff356e1120,
      _M_const_iterators = 0x0, _M_version = 5}, <No data fields>},
_M_guaranteed_capacity = 6}


2011/6/21 Noel Power <nopower@novell.com>

On 21/06/11 15:17, Markus Mohrhard wrote:

Hello Noel, all,

I have attached a test document and a diff. I don't understand why this
still crashs calc even if there is nothing anymore that can create any
problems.

well it doesn't crash for me ( even worse it doesn't crash without the
patch either ) and even worse still valgrind doesn't even complain. Welll we
know that erase invalidates vector iterators so I don't see a problem with
your patch ( or doubt it's validity ) but still interested in reproducing at
least this problem. Is there something else I need to do?

Noel

probably though I would just do the following rather than saving the
iterator and doing the delete and erase outside the loop

   if ( (*it)->mnID == nID )

  {
      delete *it;
      maPersistTable.erase( it );
      break;
  }



#0  0x00007f8b6c098ab5 in raise () from /lib64/libc.so.6
#1  0x00007f8b6c099fb6 in abort () from /lib64/libc.so.6
#2  0x00007f8b6c8a80c4 in __gnu_debug::_Error_formatter::_M_error() const () from 
/devel/libo/libo1/solver/350/unxlngx6.pro/installation/opt/program/../basis-link/ure-link/lib/libstdc++.so.6
#3  0x00007f8b4bbcbbbc in 
__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<EscherPersistEntry**, 
std::__norm::vector<EscherPersistEntry*, std::allocator<EscherPersistEntry*> > >, 
std::__debug::vector<EscherPersistEntry*, std::all
ocator<EscherPersistEntry*> > >::operator++ (this=0x7fff356e1120) at 
/usr/include/c++/4.5/debug/safe_iterator.h:206
#4  0x00007f8b4bbbf5f3 in EscherPersistTable::PtDelete (this=0x29e3658, nID=327680) at 
/devel/libo/libo1/clone/filters/filter/source/msfilter/escherex.cxx:3309
#5  0x00007f8b4bbc51ef in EscherEx::LeaveGroup (this=0x29e3658) at 
/devel/libo/libo1/clone/filters/filter/source/msfilter/escherex.cxx:4761
#6  0x00007f8b4bbe6e25 in ImplEscherExSdr::ImplExitPage (this=0x29e4bb8) at 
/devel/libo/libo1/clone/filters/filter/source/msfilter/eschesdo.cxx:894
#7  0x00007f8b4bbe6f06 in ImplEscherExSdr::ImplWriteCurrentPage (this=0x29e4bb8) at 
/devel/libo/libo1/clone/filters/filter/source/msfilter/eschesdo.cxx:916
#8  0x00007f8b4bbe6f95 in EscherEx::AddSdrPage (this=0x29e3658, rPage=...) at 
/devel/libo/libo1/clone/filters/filter/source/msfilter/eschesdo.cxx:930
#9  0x00007f8b410c59e6 in XclExpObjectManager::ProcessDrawing (this=0x29e0e08, pSdrPage=0x21b2328) 
at /devel/libo/libo1/sc/source/filter/excel/xeescher.cxx:1575
#10 0x00007f8b40ff8385 in ExcTable::FillAsXmlTable (this=0x2a27918, nCodeNameIdx=0) at 
/devel/libo/libo1/sc/source/filter/excel/excdoc.cxx:632
#11 0x00007f8b40ff6b32 in ExcTable::FillAsTable (this=0x2a27918, nCodeNameIdx=0) at 
/devel/libo/libo1/sc/source/filter/excel/excdoc.cxx:436
#12 0x00007f8b40ff8ee7 in ExcDocument::ReadDoc (this=0x7fff356e19b0) at 
/devel/libo/libo1/sc/source/filter/excel/excdoc.cxx:730
#13 0x00007f8b41162b1a in XclExpXmlStream::exportDocument (this=0x29cbeb0) at 
/devel/libo/libo1/sc/source/filter/excel/xestream.cxx:1147
#14 0x00007f8b43ccfc12 in oox::core::FilterBase::filter (this=0x29cbeb0, rMediaDescSeq=...) at 
/devel/libo/libo1/oox/source/core/filterbase.cxx:530
#15 0x00007f8b440535fa in oox::xls::ExcelFilter::filter (this=0x1fe9b50, rDescriptor=...) at 
/devel/libo/libo1/oox/source/xls/excelfilter.cxx:194
#16 0x00007f8b6a91d3e2 in SfxObjectShell::ExportTo (this=0x1efea38, rMedium=...) at 
/devel/libo/libo1/sfx2/source/doc/objstor.cxx:2348
#17 0x00007f8b6a91897a in SfxObjectShell::SaveTo_Impl (this=0x1efea38, rMedium=..., pSet=0x2026fe8) 
at /devel/libo/libo1/sfx2/source/doc/objstor.cxx:1526
#18 0x00007f8b6a91daac in SfxObjectShell::DoSave_Impl (this=0x1efea38, pArgs=0x2026fe8) at 
/devel/libo/libo1/sfx2/source/doc/objstor.cxx:2449

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.