How can one debug mex code called by fminsearch?
Mostrar comentarios más antiguos
On Windows or MacOS, I've never been able to debug a mex file without disabling Java with the option -nojvm. Otherwise I always get segmentation violation errors or bad access exceptions from Java code (a dog's breakfast, clearly) that my debugger catches.
Up to now this worked for my needs, with the minor annoyance of having to shut off all graphical output.
Now I'm trying to debug a mex code called by fminsearch. This function can use an option 'Display' 'off' (or 'none"). You'd have thought that it would play nice with -nojvm but not at all, its still insists on calling some graphics even without any need, and matlab stops with:
Error in callAllOptimPlotFcns (line 64)
fig = figure('visible','off');
What am I supposed to do now (apart from banging my head on a wall)?
Thanks for the help.
1 comentario
Respuestas (1)
Steven Lord
el 18 de Sept. de 2023
0 votos
What happened after you handled the SIGSEGV and SIGBUS signals as described in the last section, "Debug MEX with JVM", on this documentation page? Were you able to debug your MEX-file on Mac with the JVM successfully after that?
1 comentario
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!