Menu

#3447 eigenvalues called on array causes Maxima to crash

None
open
nobody
5
2018-09-02
2018-06-30
Tom Dean
No

An incorrect call to eigenvalues() causes maxima to display an error message and exit. If maxima is started with 'xterm -e maxima' it sometimes causes the xterm to close.

Console output:

> /usr/local/bin/maxima
Maxima branch_5_41_base_450_g0b7d9cd_dirty http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) A: make_array(any,3,3);
(%o1) {Lisp Array: #2A((NIL NIL NIL) (NIL NIL NIL) (NIL NIL NIL))}
(%i2) fill_array(A,[x-y, x, 0, x, x-y, x, 0, x, x-y]);
(%o2) fill_array({Lisp Array: #2A((NIL NIL NIL) (NIL NIL NIL) (NIL NIL NIL))}, 
[x - y, x, 0, x, x - y, x, 0, x, x - y])
(%i3) listarray(A);
(%o3) [false, false, false, false, false, false, false, false, false]
(%i4) eigenvalues(A);

Maxima encountered a Lisp error:

 Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-ERROR: Caught fatal error [memory may be damaged]

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i5) eigenvalues(A);

Unrecoverable error: Segmentation violation..

Discussion

  • Robert Dodier

    Robert Dodier - 2018-09-02
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +0,0 @@
    -maxima.err (997 Bytes; application/octet-stream)
    
     
  • Robert Dodier

    Robert Dodier - 2018-09-02
    • labels: --> array, eigenvalues
    • summary: Eigenvalues() causes Maxima to exit --> eigenvalues called on array causes Maxima to crash
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,30 @@
     An incorrect call to eigenvalues() causes maxima to display an error message and exit.  If maxima is started with 'xterm -e maxima' it sometimes causes the xterm to close.
    
    -Console output attached.
    +Console output:
    +
    +~~~~
    +> /usr/local/bin/maxima
    +Maxima branch_5_41_base_450_g0b7d9cd_dirty http://maxima.sourceforge.net
    +using Lisp GNU Common Lisp (GCL) GCL 2.6.12
    +Distributed under the GNU Public License. See the file COPYING.
    +Dedicated to the memory of William Schelter.
    +The function bug_report() provides bug reporting information.
    +(%i1) A: make_array(any,3,3);
    +(%o1) {Lisp Array: #2A((NIL NIL NIL) (NIL NIL NIL) (NIL NIL NIL))}
    +(%i2) fill_array(A,[x-y, x, 0, x, x-y, x, 0, x, x-y]);
    +(%o2) fill_array({Lisp Array: #2A((NIL NIL NIL) (NIL NIL NIL) (NIL NIL NIL))}, 
    +[x - y, x, 0, x, x - y, x, 0, x, x - y])
    +(%i3) listarray(A);
    +(%o3) [false, false, false, false, false, false, false, false, false]
    +(%i4) eigenvalues(A);
    +
    +Maxima encountered a Lisp error:
    +
    + Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-ERROR: Caught fatal error [memory may be damaged]
    +
    +Automatically continuing.
    +To enable the Lisp debugger set *debugger-hook* to nil.
    +(%i5) eigenvalues(A);
    +
    +Unrecoverable error: Segmentation violation..
    +~~~~
    
     
  • Robert Dodier

    Robert Dodier - 2018-09-02

    I see the error is caused by calling eigenvalues on an array, while eigenvalues (and most other functions) expect a matrix, which is a different kind of object in Maxima.

    Tom, I think what you want is:

    A : matrix ([x - y, x, 0], [x, x - y, x], [0, x, x - y]);
    eigenvalues (A);
    
     
  • Robert Dodier

    Robert Dodier - 2018-09-02

    The error here is that eigenvalues and other functions which expect a matrix should print a more intelligible error message if they get some other kind of input.

     

Log in to post a comment.