MATLAB Answers

Travis
0

waitbar closing at random times

Asked by Travis
on 6 Jan 2015
Latest activity Commented on by Oli Fairfax on 1 Jul 2019 at 13:02
I have a waitbar that opens and closes as I have 2 loops and it works inside the inner one. The problem I am having is that at times the waitbar will close on its own when I click to another window. It is inconsistent and very annoying. Has anyone else run into this problem? Any suggestions (other than don't click to another window) as to what I might be able to do to fix this?

  1 Comment

I have frequently the same problem (in 2018b) and have to check first to see if it still exists before updating it, otherwise I create a new one. It seems that it's not using it's own figure handle correctly...

Sign in to comment.

1 Answer

Answer by Jan
on 25 Jun 2019 at 13:00

Set a breakpoint in te code, which closes the waitbar. Then you can inspect the reasons why it does so.
My first guess is that "clicking on another figure" start a script, which contains a close all in a brute clearing header. Then waitbar is not responsible for the deleting, but the evil script.

  1 Comment

Unfortunately I am unable to recreate the closing whilst running in debug mode... I shall keep digging.

Sign in to comment.