AnnotationPane errors on Guide

Hi,
When MathWorks will solve the BUGs using guide on 2019b?
I just update to 2019b and it is impossible to work with all those AnnotationPane errors...
Ungoing project stopped, to late to migrate to code based GUIs or the new AppDesign interface.

 Risposta accettata

Adam Danz
Adam Danz il 18 Nov 2019
Modificato: Adam Danz il 26 Dic 2019

1 voto

Are you referring to the problem described here? If so, TMW is aware of this bug but since GUIDE GUIs will be phased out, I'm not sure whether it will be fixed or not.
See the answer provided in that link for some code to add to your OpeningFcn function to eliminate the scribeOverlay handle when the GUI is created.
[Update 20-Nov-2019]
In case anyone else is facing this problem, try out the patch provided in this FEX. It's been tested on a couple of GUIs.
[Update 26-Dec-2019]
Update #3 for r2019b fixes this problem: https://www.mathworks.com/support/bugreports/2083859

11 Commenti

Yes, I saw that, but the problem is not only when you are running, but also editing GUIs with guide (can't copy/paste, move, resize, so on...) I have a huge ungoing project and can't assume the risk of the conversion to the new App Design, I only want to finish the the goddamned software and after some thousands of dollars updating my licenses, I will need to reinstall the 2017b.
Thank you anyway.
Adam Danz
Adam Danz il 18 Nov 2019
It sounds like most of the GUI is already created. I wonder what changes need to be made because that all can be done in your openingFcn which means you wouldn't need to open the figure in GUIDE.
There is a function called guidefunc and all changes you perform on your GUI using the GUIDE (the editor), calls this function. Inside, there is a subfunction for each kind of change (copy, paste, resize...etc..) that you perform using the editor. These subfunctions retrieve the selected object handles, for example, a button object and all properties of these objects (type, string, size, position,... AND units). These ghosts objects included on 2019 with 'type' named as 'AnnotationPane' have no "units" as property, so, the builtin Matlab function crashes trying to retrieve the units of all objects, since the 'AnnotationPane' has no such property.
I suspect this ghost object (AnnotationPane) is related to that warning toolbar advertising the new AppDesigner (see picture).
Best,
2019-11-18 16_08_49-untitled.fig.png
Adam Danz
Adam Danz il 18 Nov 2019
Yes, that's exactly the problem. Annotation Panes do not have many of the properties that other graphics have so when those properties are edited on an annotation pane handle, it throws the error. The development team really should have caught this error.
I'm actually working on a patch right now so check back in a bit.
Adam Danz
Adam Danz il 18 Nov 2019
Modificato: Adam Danz il 19 Nov 2019
I've put together a patch so that you can edit the GUI from within GUIDE without the errors caused by the annotation panes.
I'd like to upload it to the file-exchange but first I'd like to confrim that it works with your GUI in addition to my test GUI.
I've put quite a lot of time into this so I hope you can do the following for me.
  1. Save a backup of your GUI (both the fig and m files). This is very important.
  2. Download the file attached and save it to your Matlab path.
  3. Once it's on your Matlab path, it should override Matlab's guidefunc(). You can confirm this by running this line from the command window: which('guidefunc','-all')
  4. Using your GUI backup - open it in GUIDE as you normally would and make the changes that have previously caused you error.
  5. Please report back with what worked and what didn't work (if anything).
Thanks.
[update] (19-Nov-2019)
Attachment removed
Hi Adam,
I just tested your code but it goes into an infinite loop of warnings and never ends (before open guide). Unfortunately it didn't work. The warnings is about the overhide problem and etc..See some prints. Best,2019-11-19 08_38_34-Window.png
Adam Danz
Adam Danz il 19 Nov 2019
Modificato: Adam Danz il 19 Nov 2019
Thanks for the feedback. The warnings are actually built-in to the custom function and the function is called many times while the GUI is being opened in GUIDE - but it shouldn't be infinite (though it may seem like a while if there are many GUI components).
It's not evident what caused the error, though. I wonder if the program was terminated using ctrl+c.
Hi Adam, Yes I terminated with Crt-C after more than 15 seconds and thousands of that warning mesage.
I had the same problem! It realy took some time (=money) to get to the root of the error... luckily I found your post. The patch worked perfectly. Thank You!
Adam Danz
Adam Danz il 25 Feb 2020
Thanks for the feedback!
I just noticed this bug even though I'm using 2020a (in 2021), it must have been the GUI was edited with an older Guide before before the fix. It only showed up when I tried to copy or paste elements which I obviously hadn't done for a while.
The patch looks like it actually repairs the .fig file so once applied the new fig file can be saved without the offending AnnotationPane objects. Once the .fig file is fixed the guidefunc.m wrapper described in the patch isn't needed any more (unless you have other corrupted .fig files from other GUIs you still work with). I wouldn't use the patch all the time or the prompts and warnings that you are using a custom version of guidefunc.m will keep popping up.

Accedi per commentare.

Più risposte (1)

Dennis
Dennis il 3 Lug 2024

0 voti

Hi,
sorry to dig up this old thread. Hope somebody can help.
I have an old GUIDE GUI created with a very old Matlab version. It worked fine in Matlab 2023b when I simply ran it!
However, I loaded it into GUIDE to modify a textbox and saved the *.fig. After that, I was no longer able to run my GUI. I receive Error:
Error using matlab.graphics.Graphics/set
Unrecognized property Enable for class AnnotationPane.
when I run my function to enable/disable GUI elements (set(handlesFilterSettings, 'Enable', 'on');)
I've tried the patch from this link, but i still receive the same error messages. Any ideas?

Categorie

Scopri di più su Graphics Performance in Centro assistenza e File Exchange

Prodotti

Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by