All the functions starting with ui (uigetfile, uigetdir, etc...) fail to work (and return 0). They do not even pop up a Window to select files.
This happened on OSX Monterey 12.3 with MATLAB 2019b, 2020b, 2021b, 2022b.
CodePudding user response:
I realized that when the MATLAB process hangs after a ui command, a new process is created for analytics and improvement. And this process apparently crashed. I tried to kill it but it did not help. I tried to disable in the preferences > Security > Privacy tab but was not able to (the GUI was not populating).
Eventually I rebooted and was able to disable Analytics and Improvements. After that MATLAB behaved fine.
CodePudding user response:
Sorry you had experienced a problem.
The UI functions in MATLAB display native macOS open/save panels - native open/save panels run out-of-process and are controlled by various system services.
Therefore, if either the QuickLook or openAndSavePanel service crashed before the panel could start (or finish) displaying, instead of a crash, you may see nothing happening. It sounds like this is probably what happened.
If that's the case, this issue has nothing to do with analytics, as macOS analytics only come into play once something crashed. Rebooting the machine is likely the thing that made the issue go away, not the disabling of analytics.
To find the root cause of the issue, the best bet is to contact MathWorks tech support and provide diagnostics, such as unified system logs, spindumps, spotlight diagnostics, quicklook database cache, native crash reports, etc.
I hope this was helpful.