rage - be paranoid about timers still going off after deletion

it seems either the ecore timer changes or eodel/unref changes have
caused something bad. timers even tho deleted by ecore_timer_del still
go ticking. this seems to happen in range with the thumb objects. the
smart del deletes the timer - explicitly then LATER the callback is
called still. bad bad bad. for now - don't segv... but eo complaints
about invalid obj id's are due to eo/efl changes.

-> cedric
-> tasn

:S
v-0.4.0
Carsten Haitzler 6 years ago
parent 43d1998c5f
commit 06065de127
  1. 17
      src/bin/videothumb.c

@ -395,6 +395,7 @@ static void
_smart_del(Evas_Object *obj)
{
Videothumb *sd = evas_object_smart_data_get(obj);
if (!sd) return;
vidthumbs = eina_list_remove(vidthumbs, obj);
if (sd->thumb_exe)
@ -404,10 +405,7 @@ _smart_del(Evas_Object *obj)
ecore_exe_kill(sd->thumb_exe);
ecore_exe_free(sd->thumb_exe);
}
if (sd->launch_timer)
{
ecore_timer_del(sd->launch_timer);
}
if (sd->launch_timer) ecore_timer_del(sd->launch_timer);
if (sd->file) eina_stringshare_del(sd->file);
if (sd->realfile) eina_stringshare_del(sd->realfile);
if (sd->realpath) free(sd->realpath);
@ -415,6 +413,16 @@ _smart_del(Evas_Object *obj)
if (sd->o_img2) evas_object_del(sd->o_img2);
if (sd->exe_handler) ecore_event_handler_del(sd->exe_handler);
if (sd->cycle_timer) ecore_timer_del(sd->cycle_timer);
sd->thumb_exe = NULL;
sd->file = NULL;
sd->realfile = NULL;
sd->realpath = NULL;
sd->o_img = NULL;
sd->o_img2 = NULL;
sd->exe_handler = NULL;
sd->cycle_timer = NULL;
_parent_sc.del(obj);
}
@ -531,6 +539,7 @@ _cb_cycle(void *data)
{
Evas_Object *obj = data;
Videothumb *sd = evas_object_smart_data_get(obj);
if (!sd) return EINA_FALSE;
if (sd->poster)
{
sd->cycle_timer = NULL;

Loading…
Cancel
Save