필터 지우기
필터 지우기

function with multiple listeners freezing on R2024a. was working fine on R2022b

조회 수: 61 (최근 30일)
Bastien Haemmerli
Bastien Haemmerli 2024년 7월 3일 8:26
댓글: Bastien Haemmerli 2024년 7월 3일 8:34
Hi,
I have created a function (with multiple embedded functions in the same .m file) that create a GUI to load a picture and add a "user defined" amount of line on it that the user can modify.
I don't think i can share the full code but on the principle:
  • once the user has selected the figure, it gets put in an ax
  • the added curves are then saved as "children of the ax"
  • there are sliders button with listeners that are linked to those lines, through the list of children of the ax.
  • when the user select a curve in a drop-down list and move the associate slider, the selected line move on the graph.
the listeners are added in a loop as the code doesn't know a priori how many lines the user would add.
I was quite proud of this code that was working exactly as intended on R2022b, when I coded it. I skipped entirely R2023 but I now installed R2024a and the code freezes when creating the first series of listeners. it does not issue any error mistake but I just hear my PC working very hard suddenly, with matlab using suddenly up to 20% of the CPU. I saw this thread
regarding potentially the same issue but it was for R2015.
I tried as well to install R2023b and the code freezes as well. for comparison I use the exact same code with the same figure and the same amount of added line (20) on all three versions. this is what I get
R2022b: lines and listeners added in 6 sec. CPU usage max up to 25%
R2023b: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 16 % at the start, but steady at 12% until I kill the process.
R2024a: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 25 % at the start, but steady at 15% until I kill the process.
I tried as well with lower amount of line (5) and all three version worked. it was very fast for R2022b (<1sec) and took about 5 sec. for R2023b and R2024a.
My code is certainly not optimal. I was learning how to make a GUI while doing it and after the fact I saw how I could have make it better, but since it was working I did not bother...and of course now I don't really "remember" all that I did back in 2022.
without seeing the code, would you be able to tell me what changed between R2022b and R2023b/R2024a that would make my code that much slowlier? would you have a quick fix?
  댓글 수: 1
Bastien Haemmerli
Bastien Haemmerli 2024년 7월 3일 8:34
Maybe it has its importance: I'm doing this for work on a work PC without admin rights. since last year, there has been some issue with the installation process of Matlab on our work computers. the auto-extractor (with winzip) fail to execute so we need to launch the installation manually. as well the "post installation processes" fail to be performed (potentially due to antivirus or lack of admin right).
this issue was not there when I installed R2022b on my PC, but did happen now when I installed R2024a and then R2023b for the trial.
potentially then the issue is linked to a failure during installation (maybe one of the step done in the "post installation processes" of the installer that is not performed on my PC for R2023b/R2024a is "helping" in running the code on R2022b?)
I'm not at all an IT expert and does not get a lot of support from our IT supplier. so I just thought about mentioning it in case it make sense for some of the MATLAB/IT "guru" in the community :)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by