notify error

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

Jan
Jan 2012년 4월 30일
Whithout seeing the code, it is impossible to guess the cause of the problem.

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2012년 4월 30일

1 개 추천

Do you have a "clear" or "clearvars" anywhere in the function? That would cause it.

댓글 수: 2

Gilad Jacobson
Gilad Jacobson 2012년 4월 30일
No such commands in any of the methods. See my above answer to Daniel - I think I've narrowed down the problem.
Thanks!
Gilad
Image Analyst
Image Analyst 2012년 4월 30일
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
Daniel Shub 2012년 4월 30일

0 개 추천

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

Gilad Jacobson
Gilad Jacobson 2012년 4월 30일
Hi,
Thanks for the answer.
Unfortunately this doesn't seem to be the issue. Nothing is being deleted, all objects still exist.
I've done some further testing and these errors occur only when events happen in relatively rapid progression. When spaced out, things work smoothly. I therefore suspect that the issue is that event callbacks become nested and are somehow interfering with each other.
Any idea how I can overcome this without large delays?
Thanks!
Gilad
Daniel Shub
Daniel Shub 2012년 4월 30일
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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

질문:

2012년 4월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by