what is the cause of the segmentation violation in this case?
35 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Aditya Srikar
2023-3-2
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!