On Thu, 19 Apr 2007 11:25:50 -0500 Brian Mattern <[EMAIL PROTECTED]>
babbled:

> On Wed, Apr 18, 2007 at 11:54:28PM -0500, Brian Mattern wrote:
> > On Sun, Apr 08, 2007 at 03:49:08PM -0400, Christopher Michael wrote:
> > > Hi all,
> > > 
> > > Mekius recently discovered a nasty segfault when trying to use the Enter 
> > > key to dismiss a dialog. As it turns out, this affects all dialogs. 
> > > After some digging into evas_callbacks.c I have come up with the 
> > > following patch. I didn't commit because I'm not entirely sure that it's 
> > > the proper solution, tho it does fix the segfault.
> > >
> > 
> > I'm not sure this is a proper fix. It looks like it would just hide a
> > bug that is somewhere else. It seems that one of the callbacks is
> > triggering something that is setting obj->callbacks to NULL. I think
> > that either the place that this happens needs to be modified to honor
> > the 'walking_list' flag on the object, or the list walking needs to be
> > modified to break if obj->callbacks is NULL after calling a cb func.
> > 
> > I only had a few minutes to look at this though, and I'm not very
> > familiar with the code.
> > 
> > Brian
> > 
> 
> After some more digging, here's what I've come up with:
> 
>   * When you hit enter, the button widget is 'activated'
>   * e_widget_activate() calls the No buttons callback, which deletes the
>     dialog
>   * this frees the evas, which frees its layers, which frees its objects,
>     which happens to set obj->callbacks to NULL
>   * e is still looping through its callbacks at this point, and segfaults
>   * the NULL check in the aforementioned patch happens to work, but only by
>     luck (the object pointer its accessing is now invalid).
> 
> So, should we require that evas callbacks not free their evas? (E.g.
> force them to schedule a free and then actually do it outside of any
> callbacks)
> 
> Or, should we alter evas to defer evas frees while walking an object's
> callbacks?

i would go for this option. evas should incriemnt a ref or busy count and then
when its finished walking decrement and if the delete_me flag is set - do the
actual delete. abort starting any list walks if delete_me is set...

> Brian
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to