notify error
Mostra commenti meno recenti
Dear all, I have come across a disturbing error while using 'notify' to update a certain class. The callback function seems to be accesses and functions partially, but I get the error
Warning: Error occurred while executing callback: Error using ==> delete Invalid handle object.
and the callback isn't completed properly.
I would appreciate any help with this disturbing issue. Best, Gilad Jacobson
1 Commento
Jan
il 30 Apr 2012
Whithout seeing the code, it is impossible to guess the cause of the problem.
Risposte (2)
Image Analyst
il 30 Apr 2012
1 voto
Do you have a "clear" or "clearvars" anywhere in the function? That would cause it.
2 Commenti
Gilad Jacobson
il 30 Apr 2012
Image Analyst
il 30 Apr 2012
I agree with Daniel - since the error message says "Error using ==> delete Invalid handle object." you are trying to delete something that is already gone. Set a breakpoint on the delete line to see what you're trying to delete and see if it's still there. You know how to use the debugger, right?
Daniel Shub
il 30 Apr 2012
0 voti
It sounds like you store a handle object B in the property of another object A. You then delete the handle object B from someplace, but not the delete method in A. Then object A tries to do something (possibly delete) object B, but object B is already deleted, which causes the error ...
2 Commenti
Gilad Jacobson
il 30 Apr 2012
Daniel Shub
il 30 Apr 2012
Something must be being deleted, the error is an error on the delete method. Do any of your objects have a delete method? It is possible the a callback which works on an object is queued, but before the queue can be empty the object gets deleted.
Categorie
Scopri di più su Interactive Control and Callbacks in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!