Borrar filtros
Borrar filtros

error message in app designer when closing app

6 visualizaciones (últimos 30 días)
Leon
Leon el 20 de Jun. de 2022
Comentada: Leon el 20 de Jun. de 2022
Hello,
I have made an App that works ok hwoever when I close my app (made in app designer), I get the following error message in the Matlab Command screen:
Invalid or deleted object.
Error in Trade_App_1/startupFcn (line 27)
app.Label_1.Text = Label_L;
Error using matlab.apps.internal.GraphicsCallbackProxy/runCallbackFunction (line 23)
Error while evaluating GraphicsCallbackProxy CallbackFcn.
Can any one help? Thx in advance
Thx
Leon
  4 comentarios
Leon
Leon el 20 de Jun. de 2022
Hello Geoff
I have an infinity loop in which I update the label with the data from another function
while 1
xxxxxxx
end
And as I mentioned it only happens when I close the app.
BR
Leon
Leon
Leon el 20 de Jun. de 2022
Sorry the answer is of course for both Jan and Geoff

Iniciar sesión para comentar.

Respuesta aceptada

Geoff Hayes
Geoff Hayes el 20 de Jun. de 2022
@Leon - rather than using a while loop to update your label (which I suspect is the cause of the error), I recommend using a timer instead to do the work that is in the body of the while loop. You would then start the timer and then later stop the timer as the app exits. This should prevent the error from occurring.
  3 comentarios
Geoff Hayes
Geoff Hayes el 20 de Jun. de 2022
@Leon - I guess it all depends upon what your current while loop is doing. Is it calculating some result and then updating the label on the UI? Can one iteration of the timer take minutes to calculate? You can stopt the timer and restart it but there doesn't seem to be any pause or resume capability. Can you provide more details about what happens in the body of your while loop?
Leon
Leon el 20 de Jun. de 2022
Thx for you answer Geoff, I will first work with to see if I can solve it. If not I will come back to you.
BR
Leon

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by