return; can cause Matlab to crash

1 visualización (últimos 30 días)
Jane Jean
Jane Jean el 30 de Mzo. de 2012
I am working on a 64-bit Matlab with a few simple lines of codes taking in input values and outputting the result. The code works perfectly on a 32-bit Matlab but cause 64-bit Matlab to crash. I tried deleting the last line of mexFunction "return;" and the code works perfectly with 64-bit Matlab too.
Although I've already found the solution, but I would still love to know why return; can cause Matlab to crash.
  2 comentarios
Ken Atwell
Ken Atwell el 30 de Mzo. de 2012
That does seem odd -- make may you think to try removing the return?
Can you provide fuller reproduction information:
1) Compiler you are building your MEX files with
2) Version of MATLAB (R2012a, ...) and platform (Windows 7, ...) you are using
3) The simplest possible MEX Source file that demonstrates the problem
Jane Jean
Jane Jean el 2 de Abr. de 2012
Thank u for the reply. I think that you are right. return; can't cause crash.
I have rechecked my code and found a mxMalloc error. After correcting the error, the code worked perfectly, with or without return;

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by