On Mon, 15 Feb 2016 16:03:21 +0000 Mike Blumenkrantz
<michael.blumenkra...@gmail.com> said:

> I think this will need to be changed then; parts of Enlightenment
> specifically skip component shutdown during the overall shutdown mechanism
> specifically to avoid this scenario and allow code to be simpler and more
> intuitive.
> 
> I'll spend a few minutes on it later in the week. Thanks for pointing out
> specifically what the cause was to save me time.

:) avoiding the shutdown is kind of a workaround too. but at least now you
know. i looked at it and went "hmmm - either i make the e_video code far less
"self contained" and force some emotion init/shutdown outside of it to keep
things around ... or i fix the assumption that these things are never null". i
chose the latter :)

> On Sun, Feb 14, 2016 at 9:01 PM Carsten Haitzler <ras...@rasterman.com>
> wrote:
> 
> > On Mon, 08 Feb 2016 18:26:50 +0000 Mike Blumenkrantz
> > <michael.blumenkra...@gmail.com> said:
> >
> > > On Fri, Feb 5, 2016 at 8:33 PM Carsten Haitzler <ras...@rasterman.com>
> > > wrote:
> > >
> > > > On Fri, 05 Feb 2016 18:00:23 +0000 Mike Blumenkrantz
> > > > <michael.blumenkra...@gmail.com> said:
> > > >
> > > > > I would much prefer figuring out what the underlying issue is here
> > rather
> > > > > than having to consistently add impossible-case null checks
> > everywhere a
> > > > > global variable (which should exist for all normal use cases) is
> > > > > dereferenced.
> > > >
> > > > i am guessing that it's simple that events are queued and not yet
> > > > processed and
> > > > something is causing them to be processed after comp is shut down.
> > that's
> > > > what
> > > > it looked like. emotion_shutdown does this to process queued events
> > from
> > > > thread
> > > > back-ends to shut them down cleanly. this happens by luck to catch new
> > x11
> > > > events too ... which all assume when they are called e_comp is always
> > > > there and
> > > > alive.
> > > >
> > > > there is no nice solution here except to "guard".
> > > >
> > >
> > > That makes zero sense. At such a time, the handlers for those events
> > would
> > > be destroyed, and thus those callbacks would not be reachable for events
> > > unless there is a far more serious bug in event dispatch.
> >
> > emotion will be shutting down when the LAST video obj is deleted (the video
> > stuff will init/shut down on demand). this will be before everything it
> > shut
> > down - eg you still may have events in the pipeline with handlers still
> > there
> > and are deleting canvases/objects and this causes the events to be
> > processed.
> >
> > > > > On Fri, Feb 5, 2016 at 4:36 AM Carsten Haitzler <
> > ras...@rasterman.com>
> > > > > wrote:
> > > > >
> > > > > > raster pushed a commit to branch master.
> > > > > >
> > > > > >
> > > > > >
> > > >
> > http://git.enlightenment.org/core/enlightenment.git/commit/?id=26a7ba3a58d573121b1dfbbca9f72988ecd8a891
> > > > > >
> > > > > > commit 26a7ba3a58d573121b1dfbbca9f72988ecd8a891
> > > > > > Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
> > > > > > Date:   Thu Feb 4 23:58:05 2016 +0900
> > > > > >
> > > > > >     e comp: fix crashes on exit/restart when e_comp is NULL
> > > > > >
> > > > > >     when we are shutting down i seem to get into a state where
> > e_comp
> > > > is
> > > > > >     null yet we are still processing events. this fixes that and
> > > > checks.
> > > > > > ---
> > > > > >  src/bin/e_comp.c   | 1 +
> > > > > >  src/bin/e_comp_x.c | 8 ++++++++
> > > > > >  2 files changed, 9 insertions(+)
> > > > > >
> > > > > > diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
> > > > > > index 4bce85d..5232d35 100644
> > > > > > --- a/src/bin/e_comp.c
> > > > > > +++ b/src/bin/e_comp.c
> > > > > > @@ -1574,6 +1574,7 @@ e_comp_block_window_del(void)
> > > > > >  E_API E_Comp *
> > > > > >  e_comp_find_by_window(Ecore_Window win)
> > > > > >  {
> > > > > > +   if (!e_comp) return NULL;
> > > > > >     if ((e_comp->win == win) || (e_comp->ee_win == win) ||
> > > > (e_comp->root
> > > > > > == win)) return e_comp;
> > > > > >     return NULL;
> > > > > >  }
> > > > > > diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
> > > > > > index 015f740..6cb50b5 100644
> > > > > > --- a/src/bin/e_comp_x.c
> > > > > > +++ b/src/bin/e_comp_x.c
> > > > > > @@ -1238,6 +1238,7 @@ _e_comp_x_show_request(void *data
> > EINA_UNUSED,
> > > > int
> > > > > > type EINA_UNUSED, Ecore_X_Eve
> > > > > >     E_Client *ec;
> > > > > >
> > > > > >     //INF("X SHOW REQ: %u", ev->win);
> > > > > > +   if (!e_comp) return ECORE_CALLBACK_RENEW;
> > > > > >     ec = _e_comp_x_client_find_by_window(ev->win);
> > > > > >     if (e_comp_ignore_win_find(ev->win) ||
> > > > > >       (ec && (ec->ignored || ec->override)) ||
> > > > > > @@ -2210,6 +2211,7 @@ _e_comp_x_mapping_change(void *data
> > EINA_UNUSED,
> > > > int
> > > > > > type EINA_UNUSED, Ecore_X_E
> > > > > >     const Eina_List *l;
> > > > > >     E_Client *ec;
> > > > > >
> > > > > > +   if (!e_comp) return ECORE_CALLBACK_RENEW;
> > > > > >     if (_e_comp_x_mapping_change_disabled) return
> > ECORE_CALLBACK_RENEW;
> > > > > >     e_comp_canvas_keys_ungrab();
> > > > > >     EINA_LIST_FOREACH(e_comp->clients, l, ec)
> > > > > > @@ -2241,6 +2243,7 @@ _e_comp_x_mouse_in(void *data EINA_UNUSED,
> > int
> > > > type
> > > > > > EINA_UNUSED, Ecore_X_Event_M
> > > > > >  {
> > > > > >     E_Client *ec;
> > > > > >
> > > > > > +   if (!e_comp) return ECORE_CALLBACK_RENEW;
> > > > > >     if (e_comp->comp_type != E_PIXMAP_TYPE_X) return
> > > > ECORE_CALLBACK_RENEW;
> > > > > >     ec = _e_comp_x_client_find_by_window(ev->win);
> > > > > >     if (!ec) return ECORE_CALLBACK_RENEW;
> > > > > > @@ -2269,6 +2272,7 @@ _e_comp_x_mouse_out(void *data EINA_UNUSED,
> > int
> > > > type
> > > > > > EINA_UNUSED, Ecore_X_Event_
> > > > > >  {
> > > > > >     E_Client *ec;
> > > > > >
> > > > > > +   if (!e_comp) return ECORE_CALLBACK_RENEW;
> > > > > >     if (e_comp->comp_type != E_PIXMAP_TYPE_X) return
> > > > ECORE_CALLBACK_RENEW;
> > > > > >     if ((ev->mode == ECORE_X_EVENT_MODE_UNGRAB) &&
> > > > > >         (ev->detail == ECORE_X_EVENT_DETAIL_INFERIOR))
> > > > > > @@ -2292,6 +2296,7 @@ _e_comp_x_mouse_wheel(void *d EINA_UNUSED,
> > int t
> > > > > > EINA_UNUSED, Ecore_Event_Mouse_
> > > > > >     E_Client *ec;
> > > > > >     E_Binding_Event_Wheel ev2;
> > > > > >
> > > > > > +   if (!e_comp) return ECORE_CALLBACK_RENEW;
> > > > > >     if (e_comp->comp_type != E_PIXMAP_TYPE_X) return
> > > > ECORE_CALLBACK_RENEW;
> > > > > >     //if (action_input_win)
> > > > > >       //ec = action_border;
> > > > > > @@ -2315,6 +2320,7 @@ _e_comp_x_mouse_up(void *d EINA_UNUSED, int t
> > > > > > EINA_UNUSED, Ecore_Event_Mouse_But
> > > > > >     E_Client *ec;
> > > > > >     E_Binding_Event_Mouse_Button ev2;
> > > > > >
> > > > > > +   if (!e_comp) return ECORE_CALLBACK_RENEW;
> > > > > >     if (e_comp->comp_type != E_PIXMAP_TYPE_X) return
> > > > ECORE_CALLBACK_RENEW;
> > > > > >     //if (action_input_win)
> > > > > >       //ec = action_border;
> > > > > > @@ -2343,6 +2349,7 @@ _e_comp_x_mouse_down(void *d EINA_UNUSED,
> > int t
> > > > > > EINA_UNUSED, Ecore_Event_Mouse_B
> > > > > >     E_Client *ec;
> > > > > >     E_Binding_Event_Mouse_Button ev2;
> > > > > >
> > > > > > +   if (!e_comp) return ECORE_CALLBACK_RENEW;
> > > > > >     if (e_comp->comp_type != E_PIXMAP_TYPE_X) return
> > > > ECORE_CALLBACK_RENEW;
> > > > > >     if (e_client_action_get()) return ECORE_CALLBACK_RENEW; //block
> > > > extra
> > > > > > mouse buttons during action
> > > > > >     //if (action_input_win)
> > > > > > @@ -2365,6 +2372,7 @@ _e_comp_x_mouse_move(void *d EINA_UNUSED,
> > int t
> > > > > > EINA_UNUSED, Ecore_Event_Mouse_M
> > > > > >  {
> > > > > >     E_Client *ec;
> > > > > >
> > > > > > +   if (!e_comp) return ECORE_CALLBACK_RENEW;
> > > > > >     if (e_comp->comp_type != E_PIXMAP_TYPE_X) return
> > > > ECORE_CALLBACK_RENEW;
> > > > > >     ec = e_client_action_get();
> > > > > >     if (!ec)
> > > > > >
> > > > > > --
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > ------------------------------------------------------------------------------
> > > > > Site24x7 APM Insight: Get Deep Visibility into Application
> > Performance
> > > > > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> > > > > Monitor end-to-end web transactions and take corrective actions now
> > > > > Troubleshoot faster and improve end-user experience. Signup Now!
> > > > > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> > > > > _______________________________________________
> > > > > enlightenment-devel mailing list
> > > > > enlightenment-devel@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > > >
> > > >
> > > >
> > > > --
> > > > ------------- Codito, ergo sum - "I code, therefore I am"
> > --------------
> > > > The Rasterman (Carsten Haitzler)    ras...@rasterman.com
> > > >
> > > >
> >
> >
> > --
> > ------------- Codito, ergo sum - "I code, therefore I am" --------------
> > The Rasterman (Carsten Haitzler)    ras...@rasterman.com
> >
> >


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to