GUI Program Crash on .fig Load

I made some updates to my GUI .fig file - renaming everything (someone else created the initial GUI), moving things around, and adding a couple objects. I don't think I tried running the program/GUI without generating an error, but the last time I tried running it, I got a crash (which I could NOT Shift+F5 out of - I had to close MATLAB) that said something about an error loading the .fig file that was (probably) associated with a createfnc (or the like). I checked the GUI's .m file, and I thought all the renames had gone through.
Has anyone else experienced this?
Is there a way to force the GUI's .m file to update (i.e. force the changes on the .fig through to the .m)?
Anyone know how to fix this?
Thanks!

 Réponse acceptée

Matt Fig
Matt Fig le 1 Déc 2012

0 votes

More details may be necessary. Did you make all of the changes through GUIDE? Did you save them as you went (change-save-check, change-save-check) or make lots of changes, then only at the end save and check (this would help narrow things down)? Did you save the changes through GUIDE? When you say you renamed things, do you mean you changed the 'tag' property, or what did you mean?

7 commentaires

Paul Huter
Paul Huter le 1 Déc 2012
Yes, through GUIDE. I went on a "name-change-frenzy", then saved all those changes, then rearranged and added and saved again. I'm not good about saving things, but I know the file had been saved before I attempted to execute the program from the MATLAB command-line.
When I renamed, I changed the tag from (say, on a static text "label") "Report" to "lbl_report". Like I said, I think everything updated, but if there was some way to force GUIDE to update them, that would be great.
Matt Fig
Matt Fig le 1 Déc 2012
You could try to export it as an M-file and see if that forces a re-write. Other than that, you may just have to go in and debug step-by-step. I know it stinks! Things like this are the reason I stopped using GUIDE completely for all my GUIs.
Let us know if you get it to work.
Paul Huter
Paul Huter le 1 Déc 2012
Hmmm...to have GUIDE rebuild the .m file and then repopulate it with all the additional code, or to look over the existing .m file with a magnifying glass or try and debug it...choice...choices...
Yeah, I should probably be a better programmer and do things from scratch, but someone else built the initial GUI, and I got tasked (initially) with making it into an executable and (later/now) "upgrading" functionality.
I'll look over the stuff tomorrow or Monday, and get back with an answer about what I find.
Thanks.
Image Analyst
Image Analyst le 1 Déc 2012
You probably have a screwed up callback. Open up property inspector and make all the callbacks "automatic" by clicking on the callback icons.
Paul Huter
Paul Huter le 2 Déc 2012
I cannot even open my .fig file, now - seems MATLAB is trying to execute all the callbacks on it when I try to load it with GUIDE. Any way to get it to open in "safe mode", or quickly rebuild?
Paul Huter
Paul Huter le 2 Déc 2012
A lot of my callbacks in the .m file are underlined orange, and MATLAB says they appear not to be used...
Paul Huter
Paul Huter le 2 Déc 2012
To get it to open, I imported the data from the .fig, then looked at the "children" structure and figured out which object names were not matching up, then I went back and edited the .m file to match up the object names. Seems the .fig file was doing some weird mapping, because all the objects in the .fig (opened through GUIDE) have the names I gave them. But, my GUI opens, so I'm not going to worry about it.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Scripts dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by