<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 - Calc crash when solver makes variables integer"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=123030">123030</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Calc crash when solver makes variables integer
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>5.2.7.2 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86 (IA32)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (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>libreoffice.org@wongs.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
With a simple spreadsheet, I can crash Calc by using Data -> Solver and three
constraints.

Steps to Reproduce:
1. Create this 3x3 spreadsheet:

          0          0          0
=A1+B1+C1           80
=1/2*A1    =2/3*B1+1/4


2. Use Tools → Solver with these values:

Target: C3
By changing: A1:C1
Limiting conditions:
    A1:C1  Integer
    A2  =  B2
    A3  =  B3
    A1:C1  >=  0
    A1:C1  <=  80

3.Click on "Solve"

Actual Results:
Crash

Expected Results:
Solve the system of linear equations


Reproducible: Always


User Profile Reset: No



Additional Info:
Order of constraints matters. Setting the inequalities first makes the solver
work. Also, setting only two of the three variables to be integers makes the
solver work. Likewise, using "Options -> Assume Variables as Integer" does not
trigger this bug.

Version: 5.2.7.2
Build ID: 1:5.2.7-1+deb9u4
CPU Threads: 2; OS Version: Linux 4.9; UI Render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group</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>