Several crash cases for build with recent sources

John W. Eaton jwe at octave.org
Fri May 22 12:56:42 CDT 2009


On 20-May-2009, Alexander Mamonov wrote:

| So how are exceptions treated for dynamically linked functions from
| .oct files in the 3.0.2 MinGW build? Do other dynamically linked
| functions throw exceptions on error like ARPACK ones do?  When I do
| >eig('a')
| in 3.0.2 MinGW build, I get an error message, but no core dump.

Do you mean eigs('a')?

The error that you see here

  >> octave:1> eigs(1)
  >> error: eigs: Too many eigenvalues to extract (k >=3D n).
  >>              Use 'eig(full(A))' instead
  >> terminate called after throwing an instance of 'octave_execution_exception'

is happening because the error handler that is called for functions
defined in liboctave is lo_error_handler and that function throws an
octave_execution_exception.  The lo_error_handler function is defined
in src/octave.cc.  The function initialize_error_handlers in
src/octave.cc arranges for lo_error_handler to be used as the
liboctave error handler.

So if the problem is throwing exceptions across DLL boundaries, then I
would expect this kind of crash for many other functions as well.  For
example, you should also see the problem with

  eig (Inf)

or

  norm ([1,2;3,4], 0.2)

Do these also cause the crash for you?

jwe



More information about the Bug-octave mailing list