<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Crash when loading an ods file when threading is enabled"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114479">114479</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash when loading an ods file when threading is enabled
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.1.0.0.alpha0+ Master
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Calc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dennisfrancis.in@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
The LO build from master crashes on loading
<a href="https://bugs.documentfoundation.org/attachment.cgi?id=120128">https://bugs.documentfoundation.org/attachment.cgi?id=120128</a> when formula group
threading is enabled in calc.

Steps to Reproduce:
1. Open the file <a href="https://bugs.documentfoundation.org/attachment.cgi?id=120128">https://bugs.documentfoundation.org/attachment.cgi?id=120128</a>
with calc with threading enabled.

Actual Results:  
Calc crashes on loading

Expected Results:
No crash


Reproducible: Always


User Profile Reset: No



Additional Info:
There are multiple issues with this document from a threading perspective :

1) assert() fails inside ScDocument::GetFormatTable()

2) A SUMIF() implicit range problem.

The offending SUMIF here in the document is :

=SUMIF($ResPer.$G$5:$G$593,"^"&D272,ResPer.$R$5)+SUMIF($ResPer.$G$5:$G$
593,"^"&D272,ResPer.$S$5)+SUMIF($ResPer.$G$5:$G$593,"^"&D272,ResPer.$AD
$5)+SUMIF($ResPer.$G$5:$G$593,"^"&D272,ResPer.$AE$5)


Notice that the third arg to each SUMIF is just a single ref, but
during evaluation, it will be implicitly expanded to the length/size of
the first argument doubleref.

The ScDependantsCalculator::Doit() simply pre-interprets all singlerefs
and doublerefs in the token array before any threading begins, hence
misses this special case requirement of SUMIF.

3) Apart from this, we need to blacklist MATCH() opcode for threading as this
one leads to calling of the slot machine like VLOOKUP does.

4) Finally there is the problem of sharing the TextSearch object
between threads without any mutex protection that happens on SUMIF(S),
COUNTIF(S) or anything that involves a call to
ScInterpreter::IterateParametersIfs().


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/62.0.3202.94 Safari/537.36</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>