Hey guys, So I took a look at T500 which seems to be a problem with elm that we should probably change before the release. Please take a look at the commit message below. The behaviour is very confusing and can lead to issues with many other widgets. The box was deleted (hover was hidden) thus all the views of the items were deleted as well. This meant that the next call to actually clear the items (by clicking items_clear) would cause an attempt to delete already deleted items.
I don't know if it's best to keep this behaviour of having one creating the view and another deleting it, or if we should change it and fix all of elm according to this change. Thoughts? -- Tom. On 19/11/13 17:26, Tom Hacohen wrote: > tasn pushed a commit to branch master. > > http://git.enlightenment.org/core/elementary.git/commit/?id=34b92db240be3d74f3b8edd87d8fa175f607378c > > commit 34b92db240be3d74f3b8edd87d8fa175f607378c > Author: Tom Hacohen <t...@stosb.com> > Date: Tue Nov 19 17:13:31 2013 +0000 > > Hoversel: Fix access to already deleted object. > > Thank you eo pointer indirection for detecting this. > The issue is a mix of design choices (will discuss on the ML) and > a bug in hoversel which was probably caused because of the confusing > design > choices. > The problem is that while widget_item->view is set by whoever created > the item, it's automatically deleted by elm_widget_item_del. This means > that objects that decided to delete their views, but were too sloppy to > update the widget_item->view pointer to NULL, would trigger an attempt > to deleted an already deleted object. This does not happen in 1.7 > because widget_item->view was introduced in 1.8. > The automatic view deletion is problematic, as smart subobjects are > already deleted when the parent subobject (the widget) is deleted. So > clearing the views is redundant. However if the widget item is manually > deleted, the view should be deleted. This causes this mixture of cases > that are problematic at best. > > Indication error: > Error: > ERR<5394>:eo lib/eo/eo_ptr_indirection.x:275 eo_obj_pointer_get() > obj_id 0x8000002900000149 is not pointing to a valid object. Maybe > it has already been freed. > > This fixes T500. > --- > src/lib/elc_hoversel.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c > index d5153ca..6299606 100644 > --- a/src/lib/elc_hoversel.c > +++ b/src/lib/elc_hoversel.c > @@ -418,12 +418,18 @@ elm_hoversel_hover_end(Evas_Object *obj) > static void > _hover_end(Eo *obj, void *_pd, va_list *list EINA_UNUSED) > { > + Elm_Object_Item *it; > + Eina_List *l; > Elm_Hoversel_Smart_Data *sd = _pd; > > if (!sd->hover) return; > > sd->expanded = EINA_FALSE; > > + EINA_LIST_FOREACH(sd->items, l, it) > + { > + VIEW(it) = NULL; > + } > evas_object_del(sd->hover); > sd->hover = NULL; > > ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel