Re: [g-a-devel]checking Accessible* validity
- From: Michael Meeks <michael ximian com>
- To: David Bolter <david bolter utoronto ca>
- Cc: gnome accessibility devel <gnome-accessibility-devel gnome org>
- Subject: Re: [g-a-devel]checking Accessible* validity
- Date: 20 Dec 2002 20:21:06 +0000
Hi David,
On Thu, 2002-12-19 at 15:15, David Bolter wrote:
> That should help actually. I think it could potentially be a good thing
> for many at-spi clients, but I am not aware of the efficiency costs.
There is ~0 efficiency cost to emit a slew of 'defunct' events on every
Accessible we have kicking around when the remote app dies - it's a
trivial and (mostly) foolproof thing to do. [ it may not like the
JavaORB depending on how 31337 it is ;-]
> > Badness ? really ? what sort ? you should be able to reliably invoke
> >these methods in perpetuity without pathalogical failure - ok so you'll
> >get bogus roles [etc.] back, but ...
>
> The example is that gok seg faults (when it tries an Accessible_getName
> ([accessible for defunct object]); I am not sure why it seg faults.
> Note that the process space for gedit is gone at this point.
Well - the defunctness of the object should make no difference at all.
This is a bug in gok (or possibly cspi). It sounds like someone is not
ref counting the Accessible * correctly. Now of course - since the same
Accessible * is shared across the whole process ( to make a == b) work
nicely, it's not necessarily at the place you're looking ;-) which may
make things more tricky.
Are you certain you're not 'taking' a const Accessible * from an event
emission and later un-reffing it ? then again it's prolly a cspi bug ;-)
A stack trace would really help (are you using HEAD at-spi)?
> > I'm thinking of caching some of the details [ such as role-type ] so we
> >could use that to nicely flag /tag a defunct state perhaps for fast
> >polling.
>
> I think I understand you here, but if the cache is finite then there is
> still no gaurantees...
Ah - but we'd cache it by expanding the Accessible* and stashing the
'role' on it - so it'd never expire, and be a nice fast way to poll
individual handles for deadness :-)
> at-poke seems to be working for me... but does it log events?
Nope; it doesn't.
> I am still using Accessible_ref and Accessible_unref on the
> event->source. I have been on leave for a few months and am a little
> out of the loop. Should I be using AccessibleEvent_ref/unref? Note, I
> am doubtful that will solve this particular issue.
It won't solve the immediate issue. I'd recommend trying to binary chop
the problem out and/or auditing all cases of Accessible_unref but first
hack cspi/spi_main.c and #define DEBUG_OBJECTS which stops at-spi from
actually freeing the last ref - if that makes the problem go away - you
know you have a ref counting bug ;-) [ having said that we zap the
structure on free with 0xaa so if you see that value around you also
know ;-]
HTH,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]