Borrar filtros
Borrar filtros

what is the cause of the segmentation violation in this case?

50 visualizaciones (últimos 30 días)
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 comentarios
Jongsung Park
Jongsung Park el 20 de Feb. de 2023
Editada: Jongsung Park el 20 de Feb. de 2023
Thanks for leaving a comment again. As you advised at the previous thread, I tried to resolve this issu with local EDA tool support center(not exactly, but one of roles of that institution is to help EDA tool users with setting up this kind of environment) . Actually, it could be much better if I was able to use Cadence customer support, but then I would have to reach to my linux server administrator for license information, since Cadence assistance requires it. which takes some time. The staff of local center noted that using spectre/RF Matlab Toolbox in MATLAB 2022b version is not compatible with any version of Spectre, let alone my version of spectre releasesd 5 years ago. he suggested that downloading a little bit older version of MATLAB could resolve the issue.
I will leave a comment again if this suggestion solves the error
Jongsung Park
Jongsung Park el 20 de Feb. de 2023
Editada: Jongsung Park el 20 de Feb. de 2023
I solved the issue by downgrading Matlab version from R2022b to R2018a.
The key is to reduce the gap between the release date of Matlab version to the one of Spectre(Or, MMSIM) version that I am using. My version of Spectre was releasesd around Sept.2018, therefore I reinstalled Matlab as R2018a version. Then it worked.
Thanks for consulting me. i really appreciate it! Is it okay to self-answer my question?

Iniciar sesión para comentar.

Respuesta aceptada

Aditya Srikar
Aditya Srikar el 2 de Mzo. de 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 !

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by