what is the cause of the segmentation violation in this case?
35 views (last 30 days)
Show older comments
Jongsung Park
on 19 Feb 2023
Answered: Aditya Srikar
on 2 Mar 2023
This is the follow-up question from here
I'm trying to inferface matlab with Cadence Spectre (a type of Spice used for electronic ciricuit simulation). There is a SPECTRE/RF Matlab Toolbox that enables interfacing between MATLAB and Spectre using a bundle of function.
with some helps from the original question, I succeeded to link dynamic libraries to Matlab by using LD_LIBRARY_PATH. However, there was another issue that caused Matlab crash, and in the crash log it reported 'segmentation violation'
is there any way that I could do to find out the cause of it?
some of log is below
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.
3 Comments
Accepted Answer
Aditya Srikar
on 2 Mar 2023
Hi Jongsung Park
If a binary MEX file causes a segmentation violation or assertion, it means that the MEX file attempted to access some unallocated segment of memory. The common cause of segmentation violation is passing a null pointer to a function.
To troubleshoot such kind of issues, run MATLAB within a debugging environment. Also you can try using older versions of MATLAB to match the version of the toolboxes you have used in the program.
Hope it helps !
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!