Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Mex file from codegen seg faulting

Subject: Mex file from codegen seg faulting

From: Chuck37

Date: 7 Dec, 2012 19:30:08

Message: 1 of 2

I have a mex file that I generated from Matlab using codegen. It worked fine for a long time but recently it has been seg faulting. The seg faults are improbable, but will always happen within 100 runs. Is there some sort of debugging I can turn on to catch the error, to isolate it to a line of code or something?

Making this more difficult is the fact the with codegen integrity checks on, the code is unusable due to being so slow. It takes many minutes where the plain old matlab will run in seconds. Not sure what that means, but I expect it'll make it harder to find this problem.

Any ideas would be great.

Subject: Mex file from codegen seg faulting

From: Chuck37

Date: 7 Dec, 2012 21:17:14

Message: 2 of 2

"Chuck37" wrote in message <k9tg40$3a1$1@newscl01ah.mathworks.com>...
> I have a mex file that I generated from Matlab using codegen. It worked fine for a long time but recently it has been seg faulting. The seg faults are improbable, but will always happen within 100 runs. Is there some sort of debugging I can turn on to catch the error, to isolate it to a line of code or something?
>
> Making this more difficult is the fact the with codegen integrity checks on, the code is unusable due to being so slow. It takes many minutes where the plain old matlab will run in seconds. Not sure what that means, but I expect it'll make it harder to find this problem.
>
> Any ideas would be great.

Okay, I thought I knew which mex this was, but it looks like its happening in any one of three randomly. How could that be? I notice the crash dump files have "crash decoding: disabled". Would that be of value, and if so how do you enable it?

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us