Matlab crashes while running *.mexw32

조회 수: 6 (최근 30일)
Amit Kalhapure
Amit Kalhapure 2012년 6월 11일
Matlab crashes while running *.mexw32 file. This file is generated from a .cpp code. The Matlab runs fine when the output data size is less, but it crashes for higher data size output.
  댓글 수: 2
Kaustubha Govind
Kaustubha Govind 2012년 6월 11일
I wonder if you're running out of memory? Try checking for NULL pointers returned from mxCreate* functions and throw an error using mexErrMsgTxt.
Amit Kalhapure
Amit Kalhapure 2012년 6월 11일
Yes I'm running short of memory. Is there any way to get rid of this problem?
Thanks.

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2012년 6월 11일
This means, that the CPP-function has a serious bug.
[EDITED, reply to comment "get rid of the problem of running out of memory]:
  1. Install more memory.
  2. Reduce the memory consumption of your program.
  3. Check all created arrays for NULL. Never never never omit such checks. They cost micro-seconds of runtime and seconds to be typed in, but they save hours of tedious debugging and not reproducible crashs.
  댓글 수: 2
Amit Kalhapure
Amit Kalhapure 2012년 6월 11일
But in VS2010 I never encountered such problem. Matlab also able to execute the same code but sometimes it fails. I get lot of warnings related to unreferenced local variable.
Thanks.
Jan
Jan 2012년 6월 11일
Dear Amit, I do not see a chance to guess the cause of the your problems without seeing the code.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by