View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] Re: [Xotcl] destroy logic

From: Kristoffer Lawson <setok_at_fishpool.com>
Date: Thu, 18 Jan 2001 20:31:44 +0200 (EET)

On Thu, 18 Jan 2001, Uwe Zdun wrote:

>
> After an object has left the callstack once, it is in the responsibility of
> the application to care for correct destroys. If that ain't the case,
> probably we have a bug here? Its hard to tell with the given information ...
> if you could isolate a smaller script & send it to me, it would be easier to
> tell what the problem is & how to solve it.
>
> Unfortunately, its nearly never easy to spot problems with complex
> (asynchronous) object destroys ;)

Yes, this is exactly why explaining, and even reproducing the
problem is difficult. In any case, I do believe we probably have
found a bug, as a method is being run and while it is run at some point
it gets a message that [self] called after destroy, or something
like that. Thus we've had to work around this in a rather complex
fashion. I'll try to explain it as best I can:

A method "event" of object "ob" is called as a result of an external
event -- like user input. This object then reads protocol data from a
socket and acts on commands sent to it. These commands it executes
via another different object "ob2". In our case, one of these commands
happens to be a RM command, which after sending to this ob2 results in ob2
calling the destroy method for ob. After this calls to [self] inside the
"event" method (which is still running at this point) cause an immediate
error.

Do you think you can work that out? ;-)

         - ---------- = = ---------//--+
         | / Kristoffer Lawson | www.fishpool.fi|.com
         +-> | setok_at_fishpool.com | - - --+------
             |-- Fishpool Creations Ltd - / |
             +-------- = - - - = --------- /~setok/