How to debug Matlab/Simulink: Unable to launch the MATLABWindow application

Problem

During your Matlab or Simulink application, you see an error message such as

How to debug

You can test this in isolation using

Example output:

Once you have verified that, test using (source: Arch Linux wiki)

When running that, you’ll see an error message like

(the error message is typically different but related to some shared library)

Solution

In this particular case libharfbuzz.so.0 from the system installations tries to load Matlab’s freetype library (libfreetype.so.6) which is incompatible with the system’s freetype library.

In this particular case, I could fix this by renaming the Matlab libfreetype.so.6:

This way, Matlab will use the system’s libfreetype.so.6 which is (in practice) compatible with the system’s libharfbuzz.so.0.

After that, restart Matlab and the issue should be resolved.


Check out similar posts by category: Matlab/Simulink