Re: [Fresco-devel] problems with dead graphics again (sorry)

[email protected] Sun, 2 Nov 2003 16:37:38 +0100
Newsgroups gmane.comp.video.fresco.devel
Message-ID <20031102153738.GA864@balthasar>
On Wed, Oct 29, 2003 at 08:46:52PM -0500, Stefan Seefeld wrote:
> [email protected] wrote:
> 
> >now the question for me is... where we sould catch this? _have_ traversals 
> >to deal with
> >dead graphics? or is this a special case and we just catch it in 
> >PositionalFocus or
> >EventManager? and how to handle it?
> 
> in a potentially distributed environment like this, where every object 
> could be
> physically located on a different machine, every method invocation may 
> throw.
> 
> If it's a parent graphic that calls into a child graphic, the parent graphic
> will update its reference (i.e. set it to _nil) so the next time it doesn't
> even try to call.
> On other occasions we have to be more careful so the scene graph doesn't get
> corrupted.
> The Traversal::update() call that is running into this is just updating
> a cache. As such, it should be totally transparent to the user. This means
> that if we can't update the cache, we must throw it out and start anew, but
> otherwise ignore the exception.
> 
> >sorry again for posting this boring stuff... it's not very creative i know 
> >-_-
> 
> oh, it is. Making an application exception-safe *and* (semantically) correct
> is pretty hard.
> 
> Thanks for looking into this !
> 
> Stefan
> 
> 
> _______________________________________________
> Fresco-devel mailing list
> [email protected]
> http://lists.fresco.org/cgi-bin/listinfo/fresco-devel
> 
> 
> [email protected] wrote:
> >On Wed, Oct 29, 2003 at 08:46:52PM -0500, Stefan Seefeld wrote:
> >
> >>in a potentially distributed environment like this, where every object 
> >>could be
> >>physically located on a different machine, every method invocation may 
> >>throw.
> >
> >so... we have to be paranoid on every interface call *g*
> 
> well, I wouldn't call it paranoid. It's just a different mindset :-)
> 
> >>The Traversal::update() call that is running into this is just updating
> >>a cache. As such, it should be totally transparent to the user. This means
> >>that if we can't update the cache, we must throw it out and start anew, 
> >>but
> >>otherwise ignore the exception.
> >
> >this means we don't do anything in TraversalImpl because the Traversal
> >corrupting just it's own stack of graphic-nodes?
> >we catch the exception in PositionalFocus and if it happens we delete the
> >Traversal and create a new? or we handle it inside TraversalImpl... 
> >cleaning the whole stack/cache... and try to fill it new from beginning?
> 
> yes, kinda. On each positional event we have to figure out which node
> should receive it. That process is called picking. But instead of
> starting over with a new traversal we look at the last memento and try
> to recover from there. That's the cache we are talking about.
yeah... but this is all handled in PositionalFocus::dispatch()
here we get PickTraversal::traverse_child() to be called...
and if GraphicImpl::pick() is called from here and the graphic-node is dead
the EventManager will report a scenegraph corruption...

this method seems to be dead-graphic-and-controller-save ;)
because if we dispatch a event to a dead controller the exception is catched
and the controller will be removed from the stack.

so... my question is... is it enough to ignore the exception raised from
TraversalImpl::update() called from PositionalEvent::damage()?

> Stefan

cinap_lenrek

> _______________________________________________
> Fresco-devel mailing list
> [email protected]
> http://lists.fresco.org/cgi-bin/listinfo/fresco-devel