Re: [g-a-devel]Gail Crashes



Hi Marc:

Thanks, I think I understand the problem now.  If we are faking 
focus events then I do think we might need to ref the widget
first, but it's not clear how/when we ensure that an 
appropriate unref is done.  At the moment a GtkAccessible
does not seem to hold a ref to its widget, which may or
may not be a problem.  However on receipt of the
"destroyed" signal we are setting the 'widget' field of
gailwidget to NULL, which is something that subsequent
gail API is supposed to check for.

So from a quick glance it appears that we are connecting to
"destroyed" and doing the right thing, but I haven't had time to
examine the stack trace and diagnose what's really going wrong.
It may be that holding a ref to gtkwidget would make sense here
but it doesn't appear to be our current strategy.

Do we need to fix this before the GUADEC demos?  I would prefer to
get Padraig in on this discussion before we go any further.

Regards,

Bill


Marc Mulcahy wrote:
> 
> Bill:
> 
> The problem here is that the GtkWidget pointer we hold still has a
> reference in it, but the actual GtkWidget structure it points to is
> gone.  So, when we call gtk_widget_get_accessible, things go wrong.
>
> If we ref the widget, is that enough?  WE don't want to prevent the widget
> from being destroyed, we just want to be notified when it is destroyed.
> 
> Maybe weakrefs are the answer...
> 
> Marc
>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]