MATLAB: Segmentation violation at startup on Fedora 26

fedorasegmentation violation

I had installed successfully MATLAB 2017b on Fedora 26 about two months ago and it worked well, but now it's crashing at startup with this segment violation error.
------------------------------------------------------------------------
Segmentation violation detected at Mon Nov 13 15:37:43 2017
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Current Graphics Driver: Unknown hardware
Current Visual : 0x21 (class 4, depth 24)
Default Encoding : UTF-8
Deployed : false
GNU C Library : 2.25 stable
Host Name : Roadrunner
MATLAB Architecture : glnxa64
MATLAB Entitlement ID: 2645808
MATLAB Root : /opt/matlab
MATLAB Version : 9.3.0.713579 (R2017b)
OpenGL : hardware
Operating System : Linux 4.13.11-200.fc26.x86_64 #1 SMP Thu Nov 2 18:28:35 UTC 2017 x86_64
Processor ID : x86 Family 6 Model 23 Stepping 10, GenuineIntel
Virtual Machine : Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : Fedora Project (11903000), display :0
Fault Count: 1
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 00007efcad11dc38 RBX = 000000000000001a
RCX = 00007efcad11f0d8 RDX = 0000000001f75650
RSP = 00007efccda54968 RBP = 0000000000000001
RSI = 00007fffd047ea38 RDI = 0000000000000001
R8 = 0000000000000000 R9 = 0000000000000028
R10 = 00007efcd4448890 R11 = 0000000000000206
R12 = 00007fffd047ea38 R13 = 0000000001f75650
R14 = 00007efcad11dc30 R15 = 00007efcd444d7d0
RIP = 000000000000beb0 EFL = 0000000000010246
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x000000000000beb0 <unknown-module>+00000000
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.

Best Answer

This error occurs when your computer cannot load a certain font display library through MATLAB.
To resolve the issue, please navigate to MATLAB R2017b installation location in your system and remove the “libfreetype.so.6” library file shipped with MATLAB R2017b, so that MATLAB will use the system version of that library:
_matlabroot_/bin/glnxa64/
Note: Here matlabroot is the location in your system where MATLAB R2017b is installed.
Eg: /usr/local/MATLAB/R2017B
Following are the commands to execute in linux shell to perform the above mentioned operation: (You may need root privilege)
  1. cd /usr/local/MATLAB/R2017b (or wherever you may have installed MATLAB)
  2. cd bin/glnxa64
  3. mkdir exclude
  4. mv libfreetype* exclude/
Now, please start MATLAB normally. If you see any warnings on MATLAB command prompt, then please follow below link to troubleshoot: