Did LiveScript Get Worse in 2020b?

3 views (last 30 days)
Paul
Paul on 13 Nov 2021
Commented: Cris LaPierre on 18 Nov 2021
I recently updated from 2019a to 2020b. I've been working on Live Script. In 2019a, it works fine. In 2020b I'm seeing a serious problem. I open the script in the editor and run a section. Works fine. I look at the output. I click on Run Section again. The little wheel in the upper left starts spinning. But the Stop box in the Run area on the ribbon is greyed out. And I don't the "Busy" indication in the lower left of the Matlab window. ctrl-c doesn't do anything. It just sits there and churns until I kill Matlab and restart, and then it happens again. This situation is untenable.
Anyone else experience the same problem? And have a solution?
  4 Comments
Paul
Paul on 13 Nov 2021
Edited: Paul on 13 Nov 2021
Win10
I will update to the latest version when I get a chance.
I have not tried Matlab Online.
Edit: Coincidentally, just before I started typing this comment, I hit the Run button on the script. Full disclaimer: I've never done this before, I've always just run individual sections. Anyway, it's been around 15-20 minutes and it's in the state described above: circle churning, Stop gray, not showing Busy . No output. No indication anything at all is happening.
Edit 2: After about 20 minutes, the script started to run as indicated by the Stop Button turning red, the Run button turning to Pause, Busy showing in the command window, and some ouput showing up. But then the script got stuck on a
clear all
line (at least that's line where the gray box was on the line numbers). I waited another 20 minutes then killed everything.
Paul
Paul on 16 Nov 2021
I think the issue was related to using "clear all" liberally throughout the script (link to thread). Once I figured out how to do what I needed without "clear all" the problem went away. Apparently "clear all" in a live script is handled different in 2020b compared to 2019a. At least that's what it looked like.

Sign in to comment.

Answers (1)

Cris LaPierre
Cris LaPierre on 18 Nov 2021
You do need to be very intentional about when you use 'clear all', as that also clears the JIT compliled code, slowing down your code as it will need to be recompiled.
  2 Comments
Paul
Paul on 18 Nov 2021
Decreasing peformance is one thing. Apparently making Matlab unresponsive (at a minimum appear to be unresponsive) is something else entirely. And as discussed in this thread clear all can affect results of previously executed commands. Nothing in the doc says or even implies that using clear all will actually cause anything to break. But it does, at least in my experience.
Cris LaPierre
Cris LaPierre on 18 Nov 2021
I think I'm safe in saying the observed change in behavior between 2019a and 2020b was not intentional. I would suggest reporting your observations here.

Sign in to comment.

Categories

Find more on Historical Contests in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!