I have a MEX file that I “borrowed” from someone else to help me code a semi-automatic kernel detection algorithm. The problem is that the MEX file sporadically causes a segmentation error. However, if the code is run with the same parameters a second time, this is normal.
I was hoping there was a kind of try/catchidiom for MEX files , but after spending most of my Saturday looking for something, I couldn't find anything.
Any help on this would be awesome! Otherwise, I have to wrap .cppin MATLAB (and that's about 10,000 lines, using hundreds of dependencies: - ().
source
share