https://bugs.documentfoundation.org/show_bug.cgi?id=118620

--- Comment #5 from Michael Meeks <michael.me...@collabora.com> ---
Some analysis:

(gdb) bt 5
#0  0x00007ffff6a60580 in __cxxabiv1::__cxa_throw(void*, std::type_info*, void
(*)(void*)) (obj=0x33b4fc0, tinfo=0x7ffff6d449b8 <typeinfo for
std::out_of_range>, dest=0x7ffff6a75cf0 <std::out_of_range::~out_of_range()>)
at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:75

#1  0x00007fffa8c94d77 in mdds::detail::throw_block_position_not_found(char
const*, int, unsigned long, unsigned long, unsigned long)
(method_sig=0x7fffaa4851fc "multi_type_vector::get_block_position", line=816,
pos=1048576, block_size=2, container_size=1048576) at
/data/opt/libreoffice/master/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector_def.inl:43


(gdb) p os.str()
$2 = {static npos = 18446744073709551615, _M_dataplus = {<std::allocator<char>>
= {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0x2d79698 "multi_type_vector::get_block_position#816: block position not
found! (logical pos=1048576, block size=2, logical size=1048576)"}}


#2  0x00007fffa8d44f41 in
mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,
svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53,
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54,
ScFormulaCell> >,
sc::CellStoreEvent>::get_block_position(mdds::__mtv::const_iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,
svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53,
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54,
ScFormulaCell> >, sc::CellStoreEvent>::const_iterator_trait,
mdds::__mtv::private_data_forward_update<mdds::__mtv::iterator_value_node<unsigned
long, mdds::mtv::base_element_block> >,
mdds::__mtv::iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,
svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53,
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54,
ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait,
mdds::__mtv::private_data_forward_update<mdds::__mtv::iterator_value_node<unsigned
long, mdds::mtv::base_element_block> > > > const&, unsigned long, unsigned
long&, unsigned long&) const (this=0x1e80b90, pos_hint=..., pos=1048576,
start_row=@0x7fffffff65f0: 1048576, block_index=@0x7fffffff65e8: 1) at
/data/opt/libreoffice/master/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector_def.inl:816
#3  0x00007fffa8da40b0 in
mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,
svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53,
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54,
ScFormulaCell> >,
sc::CellStoreEvent>::position(mdds::__mtv::const_iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,
svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53,
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54,
ScFormulaCell> >, sc::CellStoreEvent>::const_iterator_trait,
mdds::__mtv::private_data_forward_update<mdds::__mtv::iterator_value_node<unsigned
long, mdds::mtv::base_element_block> >,
mdds::__mtv::iterator_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,
svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53,
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54,
ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait,
mdds::__mtv::private_data_forward_update<mdds::__mtv::iterator_value_node<unsigned
long, mdds::mtv::base_element_block> > > > const&, unsigned long) const
(this=0x1e80b90, pos_hint=..., pos=1048576) at
/data/opt/libreoffice/master/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector_def.inl:1542
#4  0x00007fffa8e971b9 in
sc::ColumnIterator::ColumnIterator(mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,
svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53,
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54,
ScFormulaCell> >, sc::CellStoreEvent> const&, int, int) (this=0x33ec3c0,
rCells=..., nRow1=1048573, nRow2=1048575) at
/data/opt/libreoffice/master/sc/source/core/data/columniterator.cxx:174


171     
172     ColumnIterator::ColumnIterator( const CellStoreType& rCells, SCROW
nRow1, SCROW nRow2 ) :
173         maPos(rCells.position(nRow1)),
174         maPosEnd(rCells.position(maPos.first, nRow2+1))
175     {
176     }
177     

(gdb) p nRow2
$4 = 1048575
(gdb) p maPos.first
$5 =
{<mdds::__mtv::iterator_common_base<mdds::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52,
svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53,
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54,
ScFormulaCell> >, sc::CellStoreEvent>::const_iterator_trait>> = {m_cur_node =
{type = 52, position = 1048573, size = 3, data = 0x339c1b0, __private_data =
{block_index = 1}}, m_pos = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence
= 0x1e80bb0, _M_version = 3, _M_prior = 0x33ec410, _M_next = 0x0}, _M_current =
{_M_current = 0x33a0500}}, m_end = {<__gnu_debug::_Safe_iterator_base> =
{_M_sequence = 0x1e80bb0, _M_version = 3, _M_prior = 0x0, _M_next = 0x33ec3e8},
_M_current = {_M_current = 0x33a0510}}}, <No data fields>}
(gdb) p nRow1
$6 = 1048573

#5  0x00007fffa8e7b1a8 in
_ZN4o3tl11make_uniqueIN2sc14ColumnIteratorEJRKN4mdds17multi_type_vectorINS3_3mtv18custom_block_func3INS5_21default_element_blockILi52EN3svl12SharedStringEEENS5_33noncopyable_managed_element_blockILi53E14EditTextObjectEENSB_ILi54E13ScFormulaCellEEEENS1_14CellStoreEventEEERiSL_EEENSt9enable_ifIXntsr3std8is_arrayIT_EE5valueESt10unique_ptrISN_St14default_deleteISN_EEE4typeEDpOT0_
(args=..., args=@0x7fffffff66f4: 1048573, args=@0x7fffffff66f0: 1048575) at
/data/opt/libreoffice/master/include/o3tl/make_unique.hxx:29
#6  0x00007fffa8e707f6 in ScColumn::GetColumnIterator(int, int) const
(this=0x1e80ab0, nRow1=1048573, nRow2=1048575) at
/data/opt/libreoffice/master/sc/source/core/data/column4.cxx:1639

1634    std::unique_ptr<sc::ColumnIterator> ScColumn::GetColumnIterator( SCROW
nRow1, SCROW nRow2 ) const
1635    {
1636        if (!ValidRow(nRow1) || !ValidRow(nRow2) || nRow1 > nRow2)
1637            return std::unique_ptr<sc::ColumnIterator>();
1638    
1639        return o3tl::make_unique<sc::ColumnIterator>(maCells, nRow1,
nRow2);
1640    }
1641    
1642    void ScColumn::EnsureFormulaCellResults( SCROW nRow1, SCROW nRow2 )
1643    {
(gdb) p nRow2
$7 = 1048575
(gdb) p nRow1
$8 = 1048573

#7  0x00007fffa92ffd61 in ScTable::GetColumnIterator(short, int, int) const
(this=0x1e81880, nCol=0, nRow1=1048573, nRow2=1048575) at
/data/opt/libreoffice/master/sc/source/core/data/table7.cxx:430
#8  0x00007fffa8fe8ae7 in ScDocument::GetColumnIterator(short, short, int, int)
const (this=0x1e75800, nTab=0, nCol=0, nRow1=1048573, nRow2=1048575) at
/data/opt/libreoffice/master/sc/source/core/data/document10.cxx:920
#9  0x00007fffa90fe05e in (anonymous namespace)::initColumnFromDoc((anonymous
namespace)::InitDocData&, (anonymous namespace)::InitColumnData&)
(rDocData=..., rColData=...) at
/data/opt/libreoffice/master/sc/source/core/data/dpcache.cxx:394
#10 0x00007fffa90fd89e in ScDPCache::InitFromDoc(ScDocument*, ScRange const&)
(this=0x33b4470, pDoc=0x1e75800, rRange=...) at
/data/opt/libreoffice/master/sc/source/core/data/dpcache.cxx:598
#11 0x00007fffa90522b0 in ScDPCollection::SheetCaches::getCache(ScRange const&,
ScDPDimensionSaveData const*) (this=0x3459400, rRange=..., pDimData=0x0) at
/data/opt/libreoffice/master/sc/source/core/data/dpobject.cxx:2977
#12 0x00007fffa90f99ab in ScSheetSourceDesc::CreateCache(ScDPDimensionSaveData
const*) const (this=0x33b5980, pDimData=0x0) at
/data/opt/libreoffice/master/sc/source/core/data/dpshttab.cxx:305
#13 0x00007fffa9042e17 in ScDPObject::GetTableData() (this=0x34530a8) at
/data/opt/libreoffice/master/sc/source/core/data/dpobject.cxx:717
#14 0x00007fffa9042783 in ScDPObject::CreateObjects() (this=0x34530a8) at
/data/opt/libreoffice/master/sc/source/core/data/dpobject.cxx:754
#15 0x00007fffa904e360 in ScDPObject::FillOldParam(ScPivotParam&) const
(this=0x34530a8, rParam=...) at
/data/opt/libreoffice/master/sc/source/core/data/dpobject.cxx:2309
#16 0x00007fffa9b29a7e in
ScPivotLayoutDialog::ScPivotLayoutDialog(SfxBindings*, SfxChildWindow*,
vcl::Window*, ScViewData*, ScDPObject const*, bool) (this=0x3452c00,
pSfxBindings=0x1fd66f0, pChildWindow=0x2d2f330, pParent=0x1fd8160,
pViewData=0x1fe3288, pPivotTableObject=0x2d2f090, bNewPivotTable=true) at
/data/opt/libreoffice/master/sc/source/ui/dbgui/PivotLayoutDialog.cxx:152
#17 0x00007fffaa2bf445 in VclPtr<ScPivotLayoutDialog>::Create<SfxBindings*&,
SfxChildWindow*&, vcl::Window*&, ScViewData*, ScDPObject*&,
bool>(SfxBindings*&, SfxChildWindow*&, vcl::Window*&, ScViewData*&&,
ScDPObject*&, bool&&) (arg=@0x7fffffff86b0: 0x1fd66f0, arg=@0x7fffffff86a8:
0x2d2f330, arg=@0x7fffffff86a0: 0x1fd8160, arg=@0x7fffffff8318: 0x1fe3288,
arg=@0x1fe3838: 0x2d2f090, arg=@0x7fffffff8317: true) at
/data/opt/libreoffice/master/include/vcl/vclptr.hxx:131
#18 0x00007fffaa2b8e32 in ScTabViewShell::CreateRefDialog(SfxBindings*,
SfxChildWindow*, SfxChildWinInfo const*, vcl::Window*, unsigned short)
(this=0x1fe31c0, pB=0x1fd66f0, pCW=0x2d2f330, pInfo=0x7fffffff8c68,
pParent=0x1fd8160, nSlotId=26151) at
/data/opt/libreoffice/master/sc/source/ui/view/tabvwshc.cxx:422
#19 0x00007fffaa241954 in
ScPivotLayoutWrapper::ScPivotLayoutWrapper(vcl::Window*, unsigned short,
SfxBindings*, SfxChildWinInfo const*) (this=0x2d2f330, pParentP=0x1fd8160,
nId=26151, p=0x1fd66f0, pInfo=0x7fffffff8c68) at
/data/opt/libreoffice/master/sc/source/ui/view/reffact.cxx:110
#20 0x00007fffaa23ec9c in ScPivotLayoutWrapper::CreateImpl(vcl::Window*,
unsigned short, SfxBindings*, SfxChildWinInfo*) (pParent=0x1fd8160, nId=26151,
pBindings=0x1fd66f0, pInfo=0x7fffffff8c68) at
/data/opt/libreoffice/master/sc/source/ui/view/reffact.cxx:40
#21 0x00007ffff1a14161 in SfxChildWindow::CreateChildWindow(unsigned short,
vcl::Window*, SfxBindings*, SfxChildWinInfo const&) (nId=26151,
pParent=0x1fd8160, pBindings=0x1fd66f0, rInfo=...) at
/data/opt/libreoffice/master/sfx2/source/appl/childwin.cxx:256
#22 0x00007ffff1ac3223 in SfxWorkWindow::CreateChildWin_Impl(SfxChildWin_Impl*,
bool) (this=0x1fdbd60, pCW=0x25273a0, bSetFocus=true) at
/data/opt/libreoffice/master/sfx2/source/appl/workwin.cxx:1337
#23 0x00007ffff1ac5cca in SfxWorkWindow::ToggleChildWindow_Impl(unsigned short,
bool) (this=0x1fdbd60, nId=26151, bSetFocus=true) at
/data/opt/libreoffice/master/sfx2/source/appl/workwin.cxx:1848
#24 0x00007ffff1ac6c76 in SfxWorkWindow::SetChildWindow_Impl(unsigned short,
bool, bool) (this=0x1fdbd60, nId=26151, bOn=true, bSetFocus=true) at
/data/opt/libreoffice/master/sfx2/source/appl/workwin.cxx:2046
#25 0x00007ffff206f2eb in SfxViewFrame::SetChildWindow(unsigned short, bool,
bool) (this=0x1fd47d0, nId=26151, bOn=true, bSetFocus=true) at
/data/opt/libreoffice/master/sfx2/source/view/viewfrm.cxx:3072
#26 0x00007fffa9a2eb15 in ScModule::SetRefDialog(unsigned short, bool,
SfxViewFrame*) (this=0x1e5cfb0, nId=26151, bVis=true, pViewFrm=0x1fd47d0) at
/data/opt/libreoffice/master/sc/source/ui/app/scmod.cxx:1528
#27 0x00007fffaa10a692 in ScCellShell::ExecuteDataPilotDialog()
(this=0x2004c90) at
/data/opt/libreoffice/master/sc/source/ui/view/cellsh1.cxx:2928

The root cause is this:

174         maPosEnd(rCells.position(maPos.first, nRow2+1))

where nRow2 == MAXROW-1 so nRow2+1 = MAXROW which blows the container.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to