Matlab 2006a – Graphic callback causes Segmentation Fault
I’ve recently had an issue with matlab running on an AMD Athlon 64 system which I thought I might share with you all, I submitted a bug report to the Mathworks site and thought I’d post it here for others who might be experiencing the same thing.
How can we assist you: I’m having a seg fault when using any figure buttons (ie zoom, move, etc). I’ve upgraded from R14 to R2006a and have moved the old directories out of the way. I’m running on Fedora Core 5 (I selected 3 in the above list as FC5 wasn’t available). Basically I’ll open a figure window (plot(cos([0:0.1:pi]))) and then press the zoom button (cursor changes) then when I click anywhere in the figure the application seg faults, I’ve cleared my pref files from under .matlab in my home directory and cleared my LD_LIBRARY_PATH environment variable as well. I’ve attached stack trace in matlab_crash_dump.23841
Expected Behavior: I expected the figure to zoom in, it seg faulted
I then got the following response from Mathworks
This is a known bug that affects the way MATLAB behaves on some Linux machines whenever a command is executed.
For some of our users, the following workaround has been useful:
1- Use setenv BLAS_VERSION atlas_P4.so (SUSE Linux 9.2 on Intel P4/Xeon)
If the above did not work, try:
2- If your glibc is not 2.3.5 try to updating to this.
Try this, and let me know if this resolves your issue.
As I said this isn’t an Intel system so I found the corresponding Athlon binaries for BLAS and used them instead, still no joy. I also tried every version of the binaries that shipped with 2006a but they all resulted in the same behaviour, so I sent back the following email to them.
thank you for your prompt reply. Unfortunately the BLAS_VERSION workaround doesn’t work for me, I’m running the 32-bit version of fedora core 5 on an AMD Athlon X2 64bit processor. Therefore I used
export BLAS_VERSION=/usr/local/matlab2006a/bin/glnx86/atlas_Athlon.so
matlab -nojvm -nosplashcpu_id: x86 Family 15 Model 11 Stepping 2,
AuthenticAMD
libmwlapack: loading
/usr/local/matlab2006a/bin/glnx86/atlas_Athlon.so
libmwlapack: loading lapack.soand the same thing happened when using the figure buttons, I am running glibc 2.4-4 and I’ve tried upgrading it to 2.4-11 which doesn’t seem to have any effect. I’m hoping you can provide some other suggestions for me as this is really annoying. A potential could be that I have installed another version of atlas in /usr/lib/sse2/ however I’ve removed all references to that directory from my LD_LIBRARY_PATH so I don’t know how it could interfere.
And got the following back
Hi Jamie,
This is a bug in MATLAB 7.2 (R2006a). To work around this issue, start MATLAB with the “nojit” flag by calling:
matlab -nojit
from the system terminal. This will disable the JIT in that MATLAB session.
Try this and let me know if this resolves the issue.
TaDa!!!! That was it, a simple -nojit added to the end of the command line and my problem is gone (JIT is the Just In Time compiler). Now we just have to persuade the university to upgrade to version 2006b.
