Why will uifigure not create a window in r2023a?

30 views (last 30 days)
I have a script that creates an interactive window using the uifigure function. I have noticed that I could only get it to work on my Windows 10 computer running r2023a, but not running the same script on a remote cluster using CentOS7 r2023a. Some simple debugging revealed that uifigure function will produce a handle with all the appropriate attributes, but will not display any window, even when the 'Visible' property is set to 'on', or when the position vector is set to something that should be in the middle of the screen. It will however display a window for the figure function. When I loaded the modules for older versions (r2020a, r2019a, r2021a and r2022a were tested) I did not experience this problem, nor did I for for r2023a running on Windows.
If it helps for troubleshooting, when launched from the terminal, it outputs the following to the terminal:
"MATLAB is selecting SOFTWARE OPENGL rendering.
Gtk-Message: 15:28:59.180: Failed to load module "pk-gtk-module"
Gtk-Message: 15:28:59.185: Failed to load module "canberra-gtk-module" "
and in the matlab command window:
" Warning: X does not support locale en_US.UTF-8 "
the latter warning does not occur in r2021 and earlier. This makes me think this may be an issue with the OS windowing system? I could just always use an earlier version, but I'd like to know what's wrong, and get it to work.
  2 Comments
Gavin
Gavin on 16 May 2023
Hi there. Did tech support ever help you through this? I'm having the same issue and it's incredibly frustrating.
Andrew Morris
Andrew Morris on 16 May 2023
Yes, they did. I tried their advice and it worked. Here is what they sent me:
I understand that you are experiencing a few errors and warnings with MATLAB on your remote cluster. Both the message about the failed modules and the UTF-8 warning are known issues, and I have included some workarounds you can try to suppress these messages.
For the modules that failed to load:
Please refer to the following External Bug Report for workarounds:
If installing these packages does not resolve the issue, MATLAB may be unable to find the modules.
It might be that the library loader looked in several locations for "libcanberra-gtk-module.so" and "libpk-gtk-module.so: but not in the correct location of /usr/lib64/gtk-2.0/modules/.
Please try the following command in your Terminal to read the module in the correct location:
$ env LD_LIBRARY_PATH=/usr/lib64/gtk-2.0/modules matlab
Else, another experiment might be to install soft links in the MATLAB directory:
cd <matlabinstallation>/cefclient/sys/os/glnxa64
ln -s /usr/lib64/gtk-2.0/modules/libcanberra-gtk-module.so libcanberra-gtk-module.so
ln -s /usr/lib64/gtk-2.0/modules/libpk-gtk-module.so libpk-gtk-module.so
To undo the above change:
cd to <matlabinstallation>/cefclient/sys/os/glnxa64
rm libcanberra-gtk-module.so
rm libpk-gtk-module.so
Finally, please ensure that your OS is up to date, and please let me know if the issue persists despite these workarounds.
For the UTF-8 Warning:
This is a warning message that can be disregarded and it has no impact on the functionality of MATLAB. A future update will remove this warning.
I hope this helps. Given the above solutions, I am now going to close this case. However, if you have additional questions or concerns, please feel free to reach out again and I will be happy to reopen the case and assist you further.

Sign in to comment.

Accepted Answer

Cris LaPierre
Cris LaPierre on 13 Apr 2023
For technical support, please contact support.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!