Matlab freezes when using uigetfile

9 views (last 30 days)
Tomas Adamek
Tomas Adamek on 8 May 2021
Edited: Achim Wagner on 14 Jan 2022
Hi, I made an app using Matlab App Designer and through whole process of creating it, it was running just fine. Few days ago out of nowhere matlab started freezing when I pushed button in my app to get file (uigetfile). Dialog window appear and when I choose file and click OK it just freezes. I was trying to solve it really hard but I just can't...
Matlab freezes and only thing I can do is to kill it via task manager. I use R2020b, 64bit Windows 10.
I have tried using
com.mathworks.mwswing.MJFileChooserPerPlatform.setUseSwingDialog(1);
before uigetfile and also
drawnow; pause(0.5);
after uietfile and also combination but it just doesn't work. I would really appreciate help...
  1 Comment
Achim Wagner
Achim Wagner on 14 Jan 2022
Edited: Achim Wagner on 14 Jan 2022
Could you solve the problem?
I'm having the exact same problem. I also tried the workarounds you described and others suggested, but the problem still exists.
Also it seems system dependence. I've run my app on two different systems and the problem only occurs on on of them, which is a fairly new and fast system with an AMD 16 core threadripper. On the other, older systems (10 year old Intel i7) the problem has never occured. Both systems use Windows 10 64bit, R2020a.
I've also gone through the trouble to implement my own simple file dialog as a workaround, but the error still randomly occurs.
Another observation: The problem occurs seemingly more often or maybe only when the runtime of the line of codes following the file dialog are very short. To suppress user interaction after choosing the file, i'm starting an uiprogdl progress dialog directly after the file is chosen and close it after the line of codes are completed. So maybe the problem is the short progress dialog...
I'm running out of ideas. Any help would be very appreciated.

Sign in to comment.

Answers (0)

Categories

Find more on App Building in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!