MATLAB: Do I receive XWindows errors when running Simulink 5.0 (R13) on Linux

badwindowdesktoperrorfailedguiinvalidjavalinuxnojvmofparameterrequestsimulinkuiwindowxxwindows

When I am working with GUI's in Simulink 5.0 (R13) on Linux, I sometimes receive the following error:
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 20 (X_GetProperty)
Resource id in failed request: 0x0
Serial number of failed request: 151948
Current serial number in output stream: 151948

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This error can occur when using Simulink without Java. To avoid this problem, do not use the -nojvm flag.
If you do not wish to use the MATLAB desktop, use the -nodesktop flag instead.