MATLAB2023a GUI Fails to Launch (MATLABWindow Error, Exit Code 127 on Ubuntu 22.04)

36 Ansichten (letzte 30 Tage)
I'm running MATLAB 2023a on Ubuntu 22.04, and I keep getting the following error when trying to open any GUI-related function:
Error using open
MATLABWindow application failed to launch. Unable to launch the MATLABWindow application. The exit code was: 127
Warning: MATLAB has disabled some advanced graphics rendering features by switching to software OpenGL. For more information, click here.
MathWorks::System::IUserException in WebControllerFactory::create(): [Error using matlab.internal.cef.webwindow
MATLABWindow application failed to launch. Unable to launch the MATLABWindow application. The exit code was: 127
Error in matlab.internal.webwindow/createImplementation (line 319)
implObj = matlab.internal.cef.webwindow(varargin{:});
Error in matlab.internal.webwindow (line 163)
obj.impl = obj.createImplementation(varargin{:});
Error in matlab.ui.internal.controller.platformhost.CEFFigurePlatformHost/createView (line 81)
this.CEF = matlab.internal.webwindow(peerModelInfo.URL, peerModelInfo.DebugPort, position);
Error in matlab.ui.internal.controller.FigureController/createView (line 529)
this.PlatformHost.createView(this.PeerModelInfo, pos, title, visible, resizable, windowState, windowStyle, this.Model.Uuid);
Error in matlab.ui.internal.componentframework.WebComponentController/add (line 69)
obj.createView( parentController, parentView, propertiesStruct );
Error in matlab.ui.internal.controller.WebCanvasContainerController/add (line 43)
add@matlab.ui.internal.componentframework.WebContainerController( this, webComponent, parentController );
Error in matlab.ui.internal.componentframework.WebControllerFactory/create (line 94)
component.createController( parentController, [] );
Error in vmcHub/createProgressBar (line 3212)
drawnow;
Error in vmcHub/createComponents (line 5862)
app.createProgressBar;
Error in vmcHub (line 9278)
createComponents(app)
Error in vmcHubCallback (line 77)
vmcHub(getfullname(blockHdl));]
>>

Antworten (1)

Stefanie Schwarz
Stefanie Schwarz am 31 Mär. 2025
It seems that the "Model Composer Hub" block attempts to open a window by using the MATLABWindow feature, which fails.
Test that the MATLABWindow feature is operational for your MATLAB installation by running:
>> cd(matlabroot)
>> cd bin/glnxa64
>> !./MATLABWindow -url=mathworks.com
This code should open a window showing the MathWorks website. If not, see this MATLAB Answer.
If the above commands open a window showing the MathWorks website successfully, then the issue lies with the third-party product "Vitis Model Composer" which is developed by Xilinx/AMD and is external to MathWorks. We recommend contacting Xilinx support for further help.
Below are some solutions that have unblocked other users who encountered the error:
Option 1: Check Model Composer, MATLAB & OS versions
  • Ensure that you are using a version of Vitis Model Composer that is supported with your current version of MATLAB.
  • Ensure that you are using an exact Linux distribution that is supported by both Vitis Model Composer and MATLAB.
  • Use the latest possible version of Vitis Model Composer for your current version of MATLAB.
This MATLAB Answer has more details on Model Composer & MATLAB and OS compatibility:
Option 2: Modify LD_LIBRARY_PATH defined in MATLAB session
One user also reported the following workaround:
When starting MATLAB via Model Composer, the LD_LIBRARY_PATH looks as follows for their R2022b installation:
>> oldpath = getenv("LD_LIBRARY_PATH")
ans =
'/usr/local/MATLAB/R2022b/sys/os/glnxa64:/usr/local/MATLAB/R2022b/bin/glnxa64:/ ... '
After opening the Model Composer Simulink model, the path changes to:
>> newpath = getenv("LD_LIBRARY_PATH")
ans =
'/tools/Xilinx/Vivado/2023.2/lib/lnx64.o:/usr/local/MATLAB/R2022b/sys/os/glnxa64:/ ... '
So Model Composer modifies the LD_LIBRARY_PATH by adding /tools/Xilinx/Vivado/2023.2/lib/lnx64.o with the highest priority (first path). With this configuration, opening the "Vitis Model Composer Hub" block in the model will fail.
After they reverted the LD_LIBRARY_PATH manually with "setenv":
>> setenv("LD_LIBRARY_PATH", oldpath)
then they could open the "Model Composer Hub" window without error.
If this works, you could consider adding the call to "setenv" to either a model callback or block callback, so you don't always have to run it manually:
(which callback may work depends on where Xilinx places the call that modifies LD_LIBRARY_PATH, which we are not aware of).

Kategorien

Mehr zu System Composer finden Sie in Help Center und File Exchange

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by