sc/source/core/tool/interpr3.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 2f4c49fa96db7d6134fb28b20ea9ad4c51183f28
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Sep 8 10:10:10 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Sep 9 20:55:16 2022 +0200

    crashtesting: threaded assert on loading forum-de3-3100.ods
    
    use SetInterpreterContext like I see in similar places to avoid the need
    to call ScDocument::GetFormatTable
    
     #9  0x00007fd35b1af283 in ScDocument::GetFormatTable() const 
(this=this@entry=0x5573153bf1d0) at sc/source/core/data/documen2.cxx:463
             __PRETTY_FUNCTION__ = "SvNumberFormatter* 
ScDocument::GetFormatTable() const"
     #10 0x00007fd35b196f57 in ScAttrArray_IterGetNumberFormat(sal_uInt32&, 
ScAttrArray const*&, SCROW&, ScAttrArray const*, SCROW, ScDocument const&, 
ScInterpreterContext const*) (nFormat=@0x7fd354458b38: 0, 
rpArr=@0x7fd354458b30: 0x0, nAttrEndRow=@0x7fd354458b54: 0, 
pNewArr=0x557315063910, nRow=nRow@entry=30, rDoc=..., pContext=0x0) at 
sc/source/core/data/dociter.cxx:80
             nRowStart = 30
             nRowEnd = 30
             pPattern = 0x557316c093f0
     #11 0x00007fd35b19e5b7 in ScValueIterator::GetThis(double&, FormulaError&) 
(this=this@entry=0x7fd354458b20, rValue=@0x7fd354458b00: 0, 
rErr=@0x7fd354458af8: FormulaError::NONE) at sc/source/core/data/dociter.cxx:196
             bNextColumn = <optimized out>
             pCol = 0x557316aca050
             nCurRow = 30
            nLastRow = 32723
     #12 0x00007fd35b19e8c4 in ScValueIterator::GetNext(double&, FormulaError&) 
(this=<optimized out>, this@entry=0x7fd354458b20, rValue=@0x7fd354458b00: 0, 
rErr=@0x7fd354458af8: FormulaError::NONE) at sc/source/core/data/dociter.cxx:297
     #13 0x00007fd35b6a5307 in ScInterpreter::GetNumberSequenceArray(unsigned 
char, std::__debug::vector<double, std::allocator<double> >&, bool) 
(this=this@entry=0x5573169d9900, nParamCount=nParamCount@entry=1 '\001', 
rArray=std::__debug::vector of length 2, capacity 200 = {...}, 
bConvertTextInArray=bConvertTextInArray@entry=false) at 
sc/source/core/tool/interpr3.cxx:3986
             nCellCount = <optimized out>
             nErr = FormulaError::NONE
             fCellVal = 0
             aValIter = {mrDoc = @0x5573153bf1d0, pContext = 0x0, pAttrArray = 
0x0, nNumFormat = 0, nNumFmtIndex = 0, maStartPos = {nRow = 0, nCol = 0, nTab = 
4, static detailsOOOa1 = {eConv = formula::FormulaGrammar::CONV_OOO, nRow = 0, 
nCol = 0}}, maEndPos = {nRow = 199, nCol = 0, nTab = 4, static detailsOOOa1 = 
{eConv = formula::FormulaGrammar::CONV_OOO, nRow = 0, nCol = 0}}, mnCol = 0, 
mnTab = 4, nAttrEndRow = 0, mnSubTotalFlags = SubtotalFlags::NONE, nNumFmtType 
= SvNumFormatType::UNDEFINED, bNumValid = false, bCalcAsShown = true, 
bTextAsZero = false, mpCells = 0x557316aca280, maCurPos = {first = 
{<mdds::mtv::soa::detail::iterator_updater<mdds::mtv::soa::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::CellStoreTrait>::const_iterator_trait>> = {m_cur_node = 
{type = 10, position = 30, size 
 = 1, data = 0x557316d734d0, __private_data = {parent = 0x557316aca280, 
block_index = 1}}, m_pos = {position_iterator = 30, size_iterator = 1, 
element_block_iterator = 0x557316d734d0}, m_end = {position_iterator = 
7378697629483820646, size_iterator = 7378697629483820646, 
element_block_iterator = 0x6666666666666666}}, <No data fields>}, second = 0}}
             eStackType = <optimized out>
             aAdr = {nRow = 0, nCol = 0, nTab = 0, static detailsOOOa1 = {eConv 
= formula::FormulaGrammar::CONV_OOO, nRow = 0, nCol = 0}}
             aRange = {aStart = {nRow = 0, nCol = 0, nTab = 4, static 
detailsOOOa1 = {eConv = formula::FormulaGrammar::CONV_OOO, nRow = 0, nCol = 
0}}, aEnd = {nRow = 199, nCol = 0, nTab = 4, static detailsOOOa1 = {eConv = 
formula::FormulaGrammar::CONV_OOO, nRow = 0, nCol = 0}}}
             bIgnoreErrVal = false
             nParam = 0
             nRefInList = 0
     #14 0x00007fd35b6aa9ed in ScInterpreter::CalculateSmallLarge(bool) 
(this=this@entry=0x5573169d9900, bSmall=bSmall@entry=true) at 
sc/source/core/tool/interpr3.cxx:3657
             nCol = 1
             nRow = 1
             aArray = std::__debug::vector of length 1, capacity 1 = {1}
             nRankArraySize = 1
             __PRETTY_FUNCTION__ = "void 
ScInterpreter::CalculateSmallLarge(bool)"
             aRankArray = std::__debug::vector of length 1, capacity 1 = {1}
             aSortArray = std::__debug::vector of length 2, capacity 200 = {1, 
21}
             nSize = <optimized out>
     #15 0x00007fd35b6abac8 in ScInterpreter::ScSmall() 
(this=this@entry=0x5573169d9900) at sc/source/core/tool/interpr3.cxx:3717
     #16 0x00007fd35b6cd929 in ScInterpreter::Interpret() 
(this=this@entry=0x5573169d9900) at sc/source/core/tool/interpr4.cxx:4373
             bGotResult = <optimized out>
             nRetTypeExpr = SvNumFormatType::NUMBER
             nRetIndexExpr = 0
             nErrorFunction = 0
             nErrorFunctionCount = 0
             aErrorFunctionStack = std::__debug::vector of length 0, capacity 0
             nStackBase = 0
             aTokenMatrixMapIter = Python Exception <class 'AttributeError'> 
'NoneType' object has no attribute 'pointer':
     {_M_node = 0x5573169d99c8}
             eOp = ocSmall
             __PRETTY_FUNCTION__ = "formula::StackVar 
ScInterpreter::Interpret()"
             bForcedResultType = <optimized out>
             p = <optimized out>
             eType = <optimized out>
     #17 0x00007fd35b3c6ed1 in 
ScFormulaCell::InterpretTail(ScInterpreterContext&, 
ScFormulaCell::ScInterpretTailParameter) (this=0x55731309d8f0, rContext=..., 
eTailParam=eTailParam@entry=ScFormulaCell::SCITP_NORMAL) at 
sc/source/core/data/formulacell.cxx:1945
             pScopedInterpreter = std::unique_ptr<class ScInterpreter> = {get() 
= 0x0}
             pInterpreter = 0x5573169d9900
             nOldErrCode = FormulaError::NONE
             bContentChanged = <optimized out>
             aNewResult = {static MULTILINE_UNKNOWN = 0 '\000', static 
MULTILINE_FALSE = 1 '\001', static MULTILINE_TRUE = 2 '\002', {mfValue = 
6.9438766800236802e-310, mpToken = 0x7fd3544591e8}, mbToken = false, mbEmpty = 
false, mbEmptyDisplayedAsString = false, mbValueCached = true, meMultiline = 3 
'\003', mnError = 28442}
             bOldRunning = false
             bForceNumberFormat = <optimized out>
             aRecursionCounter = {rRec = @0x557316da2b40, bStackedInIteration = 
false, cell = 0x55731309d8f0}
     #18 0x00007fd35b0c84cb in 
ScColumn::CalculateInThread(ScInterpreterContext&, int, unsigned long, unsigned 
long, unsigned int, unsigned int) (this=<optimized out>, rContext=..., 
nRow=nRow@entry=0, nLen=nLen@entry=30, nOffset=nOffset@entry=0, 
nThisThread=nThisThread@entry=0, nThreadsTotal=48) at 
sc/source/core/data/column2.cxx:3218
    
    Change-Id: Ifeddbfda8afe47c3754ed1fcab836dfd2c8f38ca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139636
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 4088a1b36c1a..35126ac19c12 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -3967,6 +3967,7 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 
nParamCount, vector<double
                 FormulaError nErr = FormulaError::NONE;
                 double fCellVal;
                 ScValueIterator aValIter( mrDoc, aRange, mnSubTotalFlags );
+                aValIter.SetInterpreterContext( &mrContext );
                 if (aValIter.GetFirst( fCellVal, nErr))
                 {
                     if (bIgnoreErrVal)

Reply via email to