Segmentation violation while executing Mex file:

2 views (last 30 days)
I am in great trouble as I am getting following error message while executing a Matlab application which contains a Mex file:
------------------------------------------------------------------------ Segmentation violation detected at Tue Jan 13 14:46:11 2015 ------------------------------------------------------------------------
Configuration: Crash Decoding : Disabled Current Visual : Quartz Default Encoding : ISO-8859-1 MATLAB Architecture: maci64 MATLAB Root : /Applications/MATLAB_R2014a.app MATLAB Version : 8.3.0.532 (R2014a) Operating System : Darwin 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 Processor ID : x86 Family 6 Model 37 Stepping 2, GenuineIntel Virtual Machine : Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode Window System : Quartz
Fault Count: 7
Abnormal termination: Segmentation violation
Register State (from fault): RAX = 00000001148b2000 RBX = 0000000000000808 RCX = 0000000000000080 RDX = 00007ff16a4d3c80 RSP = 00000001368b6970 RBP = 000000013b636580 RSI = 00007fff8b08327c RDI = 0000000119143100
R8 = 0000000000000000 R9 = 00007ff16a4d3cf8
R10 = 00000001376bb6c0 R11 = 00007ff16a4d3c80
R12 = 0000000119143170 R13 = 0000000116b760f2
R14 = 000000013b8ed0e0 R15 = 0000000000000000
RIP = 3ff0000000000000 RFL = 00007ff16a4d3c80
CS = 000000013b8ed100 FS = 00007ff16a4d3cf8 GS = 0000000136f39e00
Stack Trace (from fault): [ 0] 0x000000010ee8d874 /Applications/MATLAB_R2014a.app/bin/maci64/libmwfl.dylib+00030836 ZN2fl4diag15stacktrace_base7captureERKNS0_14thread_contextEm+00000052 [ 1] 0x000000010ee912aa /Applications/MATLAB_R2014a.app/bin/maci64/libmwfl.dylib+00045738 _ZN2fl4test17terminate_handledEv+00000906 [ 2] 0x000000010ee90cf5 /Applications/MATLAB_R2014a.app/bin/maci64/libmwfl.dylib+00044277 _ZN2fl4diag13terminate_logEPKcPK17_darwin_ucontext+00000117 [ 3] 0x000000010ea0cd07 /Applications/MATLAB_R2014a.app/bin/maci64/libmwmcr.dylib+00269575 _Z32mnRunPathDependentInitializationv+00003127 [ 4] 0x000000010ea0cff8 /Applications/MATLAB_R2014a.app/bin/maci64/libmwmcr.dylib+00270328 _Z32mnRunPathDependentInitializationv+00003880 . . . . . . This error was detected while a MEX-file was running. If the MEX-file is not an official MathWorks function, please examine its source code for errors. Please consult the External Interfaces Guide for information on debugging MEX-files.
If this problem is reproducible, please submit a Service Request via: http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.** This crash report has been saved to disk as /Users/user/matlab_crash_dump.317-7
Caught MathWorks::System::FatalException --------------------------------------------
I have attached the Mex file as a text file here.
Could anyone please help me to overcome this error? Any kind of help in this regard will be highly appreciated.
  1 Comment
Geoff Hayes
Geoff Hayes on 24 Jan 2015
How are you invoking this function? What inputs (if any) are you passing in to it? Try breaking the code down into smaller chunks (i.e. comment out parts of the code) until you find that the function works, then start adding functionality back in until it breaks again. At that point, concentrate on the piece that is causing the code to fail, and see if you can determine why this might be the case.

Sign in to comment.

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!