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;
 

-- 


Reply via email to