<html>
    <head>
      <base href="http://bugzilla.scilab.org/" />
    </head>
    <body><br>
    ---------- Bug Summary ----------- <br>a = sparse(rand(5,2)); a(8) = a(8) - %i   => crashes Scilab. a(8) = a(8) - 1   runs OK <br><br>
    <br>
      <p>
        <div>

            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - a = sparse(rand(5,2)); a(8) = a(8) - %i => crashes Scilab. a(8) = a(8) - 1 runs OK"
   href="http://bugzilla.scilab.org/show_bug.cgi?id=13838#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - a = sparse(rand(5,2)); a(8) = a(8) - %i => crashes Scilab. a(8) = a(8) - 1 runs OK"
   href="http://bugzilla.scilab.org/show_bug.cgi?id=13838">bug 13838</a>
              from <span class="vcard"><a class="email" href="mailto:sgougeon@free.fr" title="Samuel GOUGEON <sgougeon@free.fr>"> <span class="fn">Samuel GOUGEON</span></a>
</span></b>
        <pre>This line of instructions does not crash Scilab 4.1.2 but gives systematically a strange result like this one:

-->a = rand(5,2), a = sparse(a), a(8) = a(8) - %i
 a  =

    0.5015342    0.9184708
    0.4368588    0.0437334
    0.2693125    0.4818509
    0.6325745    0.2639556
    0.4051954    0.4148104
 a  =

(    5,    2) sparse matrix

(    1,    1)        0.5015342
(    1,    2)        0.9184708
(    2,    1)        0.4368588
(    2,    2)        0.0437334
(    3,    1)        0.2693125
(    3,    2)        0.4818509
(    4,    1)        0.6325745
(    4,    2)        0.2639556
(    5,    1)        0.4051954
(    5,    2)        0.4148104
 a  =

(    5,    2) sparse matrix

(    1,    1)       0.5015342
(    1,    2)       0.9184708
(    2,    1)       0.4368588
(    2,    2)       0.0437334
(    3,    1)       0.2693125
(    4,    1)       0.6325745
(    4,*****)       2.122-314 + 2.122-314i
(    5,    1)       0.4051954
(    5,    2)       0.4818509
(    6,    1)       0.0437334

Here :
1) The (3,2) element disapears
2) The (4,2) element (index "******" and related values) is corrupted.
3) an oversized i-index == 6 appears (last line)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>