Re: [E-devel] [EGIT] [core/efl] master 01/01: eo: Make error message less nebulous

2016-12-05 Thread Jean-Philippe André
On 6 December 2016 at 10:43, Gustavo Sverzut Barbieri 
wrote:

> On Mon, Dec 5, 2016 at 9:49 PM, Carsten Haitzler 
> wrote:
> > On Mon, 5 Dec 2016 01:29:19 -0200 Gustavo Sverzut Barbieri <
> barbi...@gmail.com>
> > said:
> >
> >> improved but not ideal.
> >>
> >> what if we hint based on current x object domain, if they differ you
> >> can say that it's from a different thread... also hint on how to fix,
> >> maybe a wiki page that we show the link there.
> >
> > that isn't actually better. 99% of the time it's actually an invalid
> object
> > entirely. not just accessing from another thread. you should add that
> question
> > there too. also ask if the object has been deleted or unreferenced to 0
> yet?
> > also ask if the object is meant to be accessible but
> > ecore_thread_main_loop_begin() (and end() to end the segment) have not
> been
> > called yet?
>

Nope because we haven't started resolving the object ID yet, only its
domain.
Which is why I kept the message simpler than the generic one.

In fact I think the generic message gives too much information that has no
value for actual users, without explaining why the object id is wrong (is
it not an object? has it maybe been invalidated? etc...)

> my point is - you can ask questions all day long and make this error
> huge. the
> > object id is invalid where it is being accessed. WHY could be many
> reasons but
> > you've been given the breakdown of the components of the ID and current
> domains
> > whcih canhelp diagnose thread issues if they are there.
>
> with new EO_LIFECYCLE_DEBUG you have these information, you can know
> if the object was created, deleted and so on... then you could help
> the user, not flood him with data.
>
> See the new envvar + libeo_dbg.so (eo_debug), then you get valgrind
> like information:
>
> object was created as eoid, obj (real ptr), class... [x seconds ago]
> 
> object was deleted as eoid, obj (real ptr), class... [x seconds ago]
> 
> object is already dead
>
> or "object is still alive".
>
> in the second case, you can print "but it's in a different domain".


-- 
Jean-Philippe André
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: eo: Make error message less nebulous

2016-12-05 Thread Gustavo Sverzut Barbieri
On Mon, Dec 5, 2016 at 9:49 PM, Carsten Haitzler  wrote:
> On Mon, 5 Dec 2016 01:29:19 -0200 Gustavo Sverzut Barbieri 
> 
> said:
>
>> improved but not ideal.
>>
>> what if we hint based on current x object domain, if they differ you
>> can say that it's from a different thread... also hint on how to fix,
>> maybe a wiki page that we show the link there.
>
> that isn't actually better. 99% of the time it's actually an invalid object
> entirely. not just accessing from another thread. you should add that question
> there too. also ask if the object has been deleted or unreferenced to 0 yet?
> also ask if the object is meant to be accessible but
> ecore_thread_main_loop_begin() (and end() to end the segment) have not been
> called yet?
>
> my point is - you can ask questions all day long and make this error huge. the
> object id is invalid where it is being accessed. WHY could be many reasons but
> you've been given the breakdown of the components of the ID and current 
> domains
> whcih canhelp diagnose thread issues if they are there.

with new EO_LIFECYCLE_DEBUG you have these information, you can know
if the object was created, deleted and so on... then you could help
the user, not flood him with data.

See the new envvar + libeo_dbg.so (eo_debug), then you get valgrind
like information:

object was created as eoid, obj (real ptr), class... [x seconds ago]

object was deleted as eoid, obj (real ptr), class... [x seconds ago]

object is already dead

or "object is still alive".

in the second case, you can print "but it's in a different domain".


-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: eo: Make error message less nebulous

2016-12-05 Thread The Rasterman
On Mon, 5 Dec 2016 01:29:19 -0200 Gustavo Sverzut Barbieri 
said:

> improved but not ideal.
> 
> what if we hint based on current x object domain, if they differ you
> can say that it's from a different thread... also hint on how to fix,
> maybe a wiki page that we show the link there.

that isn't actually better. 99% of the time it's actually an invalid object
entirely. not just accessing from another thread. you should add that question
there too. also ask if the object has been deleted or unreferenced to 0 yet?
also ask if the object is meant to be accessible but
ecore_thread_main_loop_begin() (and end() to end the segment) have not been
called yet?

my point is - you can ask questions all day long and make this error huge. the
object id is invalid where it is being accessed. WHY could be many reasons but
you've been given the breakdown of the components of the ID and current domains
whcih canhelp diagnose thread issues if they are there.

> On Sun, Dec 4, 2016 at 10:55 PM, Jean-Philippe ANDRÉ 
> wrote:
> > jpeg pushed a commit to branch master.
> >
> > http://git.enlightenment.org/core/efl.git/commit/?id=c6dcf3dda448c422bd556834b336f7fdb9296097
> >
> > commit c6dcf3dda448c422bd556834b336f7fdb9296097
> > Author: Jean-Philippe Andre 
> > Date:   Mon Dec 5 09:46:55 2016 +0900
> >
> > eo: Make error message less nebulous
> >
> > When writing this ERR log I thought about "thread" (it's really
> > the keyword here) but eventually reworded to "context". Let's be
> > clearer about the possible issue here.
> > ---
> >  src/lib/eo/eo.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
> > index dd6cff6..37c2a4c 100644
> > --- a/src/lib/eo/eo.c
> > +++ b/src/lib/eo/eo.c
> > @@ -1662,7 +1662,8 @@ err_obj:
> >  err:
> > if (!data) return EINA_FALSE;
> > ERR("Object %p is not a valid object in this context: object domain: %
> > d, "
> > -   "current domain: %d, local domain: %d, available domains: [%s %s %s
> > %s]",
> > +   "current domain: %d, local domain: %d, available domains: [%s %s %s
> > %s]."
> > +   " Are you trying to access this object from another thread?",
> > eo_id, (int)domain,
> > (int)data->domain_stack[data->stack_top], (int)data->local_domain,
> > (data->tables[0]) ? "0" : " ", (data->tables[1]) ? "1" : " ",
> >
> > --
> >
> >
> 
> 
> 
> -- 
> Gustavo Sverzut Barbieri
> --
> Mobile: +55 (16) 99354-9890
> 
> --
> ___
> 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


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: eo: Make error message less nebulous

2016-12-04 Thread Gustavo Sverzut Barbieri
improved but not ideal.

what if we hint based on current x object domain, if they differ you
can say that it's from a different thread... also hint on how to fix,
maybe a wiki page that we show the link there.

On Sun, Dec 4, 2016 at 10:55 PM, Jean-Philippe ANDRÉ  wrote:
> jpeg pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=c6dcf3dda448c422bd556834b336f7fdb9296097
>
> commit c6dcf3dda448c422bd556834b336f7fdb9296097
> Author: Jean-Philippe Andre 
> Date:   Mon Dec 5 09:46:55 2016 +0900
>
> eo: Make error message less nebulous
>
> When writing this ERR log I thought about "thread" (it's really
> the keyword here) but eventually reworded to "context". Let's be
> clearer about the possible issue here.
> ---
>  src/lib/eo/eo.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
> index dd6cff6..37c2a4c 100644
> --- a/src/lib/eo/eo.c
> +++ b/src/lib/eo/eo.c
> @@ -1662,7 +1662,8 @@ err_obj:
>  err:
> if (!data) return EINA_FALSE;
> ERR("Object %p is not a valid object in this context: object domain: %d, "
> -   "current domain: %d, local domain: %d, available domains: [%s %s %s 
> %s]",
> +   "current domain: %d, local domain: %d, available domains: [%s %s %s 
> %s]."
> +   " Are you trying to access this object from another thread?",
> eo_id, (int)domain,
> (int)data->domain_stack[data->stack_top], (int)data->local_domain,
> (data->tables[0]) ? "0" : " ", (data->tables[1]) ? "1" : " ",
>
> --
>
>



-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (16) 99354-9890

--
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel