[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible issue in Octave when using C++ exceptions in MEX functions
From: |
Arnaud BARRE |
Subject: |
Possible issue in Octave when using C++ exceptions in MEX functions |
Date: |
Thu, 11 Aug 2011 08:13:09 +0200 |
Hi,
I developed a toolbox in biomechanics (BTK: Biomechanical ToolKit -
b-tk.googlecode.com) for Matlab using MEX functions. One user proposed
me to patch the code to be able to compile these MEX functions for
Octave. It was done without any problem and the functions works well.
However, few of these functions throw C++ exceptions (managed
correctly by a try/catch) and Octave doesn't like them.
For example, under MacOS X (10.5., using the latest binary provided by
Octave-Forge: Octave 3.4.0), the error message is not displayed (It is
like everything was right) and Octave freezed. The other command are
no more executed and I have to kill the process.
Under Windows (Octave 3.2.4), the problem is different. I can see the
error message, continue to execute commands, but when I close Octave,
it crashes.
You can see the code for one MEX function using a try/catch for C++
exceptions here:
http://code.google.com/p/b-tk/source/browse/BTK/trunk/Wrapping/Matlab/btkReadAcquisition.cpp
This function works without any problem under Matlab (Windows, MacOS X
and Linux).
Thank you very much.
Arnaud
- Possible issue in Octave when using C++ exceptions in MEX functions,
Arnaud BARRE <=